All checks were successful
goreleaser-action v7.1.0 made cosign signature verification of its own download mandatory, and ci-base ships no cosign — the goreleaser-lint job failed on the v6.4.0 -> v7.2.3 bump. The action was redundant anyway: ci-base already installs goreleaser from the upstream apt repo, which is what `make build` has always used. Both workflows now call it directly, and `goreleaser check` moves behind a `make check` target so every CI job runs a make target. Co-authored-by: multica-agent <github@multica.ai>
62 lines
1.4 KiB
Makefile
62 lines
1.4 KiB
Makefile
PROJECT_NAME := smtp2shoutrrr
|
|
CGO_ENABLED := 0
|
|
|
|
DIST_PATH := ./dist
|
|
TEST_OPTIONS := -v -failfast -race -bench=. -benchtime=100000x -cover -coverprofile=coverage.out
|
|
|
|
GOLANGCI_LINT_VERSION := v2.13.2
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
## help: Display this help message
|
|
.PHONY: help
|
|
help:
|
|
@echo "Available targets:"
|
|
@grep -E '^## ' $(MAKEFILE_LIST) | sed 's/## / /' | sort
|
|
|
|
## build: Build project using goreleaser (snapshot)
|
|
.PHONY: build
|
|
build:
|
|
goreleaser build --snapshot --clean
|
|
|
|
## quick-run: Execute project directly using go run
|
|
.PHONY: quick-run
|
|
quick-run:
|
|
CGO_ENABLED=$(CGO_ENABLED) go run ./cmd/$(PROJECT_NAME)
|
|
|
|
## run: Build and execute the local binary
|
|
.PHONY: run
|
|
run: build
|
|
$(DIST_PATH)/$(PROJECT_NAME)
|
|
|
|
## format: Format code and tidy modules
|
|
.PHONY: format
|
|
format:
|
|
go fmt ./...
|
|
go mod tidy
|
|
|
|
## check: Validate the goreleaser configuration
|
|
.PHONY: check
|
|
check:
|
|
goreleaser check
|
|
|
|
## ci-lint: Run golangci-lint (installs if missing)
|
|
.PHONY: ci-lint
|
|
ci-lint:
|
|
@which golangci-lint > /dev/null 2>&1 || go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
|
|
golangci-lint run ./...
|
|
|
|
## lint: Run linters
|
|
.PHONY: lint
|
|
lint: ci-lint
|
|
|
|
## test: Run tests with coverage
|
|
.PHONY: test
|
|
test:
|
|
CGO_ENABLED=1 go test $(TEST_OPTIONS) -timeout 1m ./...
|
|
|
|
## clean: Remove build artifacts
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf $(DIST_PATH)
|
|
go clean -cache -testcache
|