- Update Makefile to run lint and vet before tests - Add install target to Makefile - Fix keychainunlocker_stub.go for non-Darwin platforms
38 lines
571 B
Makefile
38 lines
571 B
Makefile
export CGO_ENABLED=1
|
|
export DOCKER_HOST := ssh://root@ber1app1.local
|
|
|
|
default: check
|
|
|
|
build: ./secret
|
|
|
|
# Simple build (no code signing needed)
|
|
./secret:
|
|
go build -v -o $@ cmd/secret/main.go
|
|
|
|
vet:
|
|
go vet ./...
|
|
|
|
test: lint vet
|
|
go test ./... || go test -v ./...
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
lint:
|
|
golangci-lint run --timeout 5m
|
|
|
|
# Build Docker container
|
|
docker:
|
|
docker build -t sneak/secret .
|
|
|
|
# Run Docker container interactively
|
|
docker-run:
|
|
docker run --rm -it sneak/secret
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
rm -f ./secret
|
|
|
|
install: ./secret
|
|
cp ./secret $(HOME)/bin/secret
|