initial
This commit is contained in:
39
Makefile
Normal file
39
Makefile
Normal file
@@ -0,0 +1,39 @@
|
||||
.PHONY: test fmt lint build run clean
|
||||
|
||||
# Default target
|
||||
test: lint
|
||||
go test -v ./...
|
||||
|
||||
fmt:
|
||||
go fmt ./...
|
||||
|
||||
lint:
|
||||
golangci-lint run
|
||||
|
||||
build: test
|
||||
go build -o bin/webhooker cmd/webhooker/main.go
|
||||
|
||||
run: build
|
||||
./bin/webhooker
|
||||
|
||||
clean:
|
||||
rm -rf bin/
|
||||
|
||||
# Development helpers
|
||||
.PHONY: dev deps
|
||||
|
||||
dev:
|
||||
go run cmd/webhooker/main.go
|
||||
|
||||
deps:
|
||||
go mod download
|
||||
go mod tidy
|
||||
|
||||
# Docker targets
|
||||
.PHONY: docker-build docker-run
|
||||
|
||||
docker-build:
|
||||
docker build -t webhooker:latest .
|
||||
|
||||
docker-run: docker-build
|
||||
docker run --rm -p 8080:8080 webhooker:latest
|
||||
Reference in New Issue
Block a user