latest
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,13 +1,19 @@
|
||||
export CGO_ENABLED=1
|
||||
export DOCKER_HOST := ssh://root@ber1app1.local
|
||||
|
||||
# Version information
|
||||
VERSION := 0.1.0
|
||||
GIT_COMMIT := $(shell git rev-parse HEAD 2>/dev/null || echo "unknown")
|
||||
LDFLAGS := -X 'git.eeqj.de/sneak/secret/internal/cli.Version=$(VERSION)' \
|
||||
-X 'git.eeqj.de/sneak/secret/internal/cli.GitCommit=$(GIT_COMMIT)'
|
||||
|
||||
default: check
|
||||
|
||||
build: ./secret
|
||||
|
||||
# Simple build (no code signing needed)
|
||||
./secret:
|
||||
go build -v -o $@ cmd/secret/main.go
|
||||
go build -v -ldflags "$(LDFLAGS)" -o $@ cmd/secret/main.go
|
||||
|
||||
vet:
|
||||
go vet ./...
|
||||
@@ -21,6 +27,8 @@ fmt:
|
||||
lint:
|
||||
golangci-lint run --timeout 5m
|
||||
|
||||
check: build test
|
||||
|
||||
# Build Docker container
|
||||
docker:
|
||||
docker build -t sneak/secret .
|
||||
|
||||
Reference in New Issue
Block a user