-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (17 loc) · 851 Bytes
/
Copy pathMakefile
File metadata and controls
24 lines (17 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
GO ?= go
VERSION ?= $(shell git describe --tags --match 'v*' --always --dirty 2>/dev/null || echo dev)
.PHONY: build test lint vet fmt snapshot
build:
$(GO) build -trimpath -ldflags "-s -w -X github.com/iugu/cli/internal/cli.Version=$(VERSION)" -o bin/iugu ./cmd/iugu
test:
$(GO) test ./...
vet:
$(GO) vet ./...
fmt:
gofmt -l . && test -z "$$(gofmt -l .)"
lint: vet
@command -v staticcheck >/dev/null && staticcheck ./... || echo "staticcheck not installed (go install honnef.co/go/tools/cmd/staticcheck@latest)"
# Local release rehearsal: every archive, checksums, changelog; no publishing, no signing. The SBOM step needs
# syft (brew install syft) and is skipped without it; CI has cosign and syft.
snapshot:
TAP_GITHUB_TOKEN=unused goreleaser release --snapshot --clean --skip=publish,sign$$(command -v syft >/dev/null || echo ,sbom)