Bootstrap the gitflow module so subsequent phases build on a verified, linted foundation. - go.mod: initialize module gitea.oblak.solutions/dimitar/gitFlow at go 1.24 - cmd/gitflow/main.go: minimal entrypoint that prints the version string; this is a placeholder that Phase 2 (CLI & config) replaces with Cobra - internal/version: version metadata injectable at build time via ldflags, with a Makefile target wiring VERSION through - Makefile: build / test / fmt / vet / lint / install / clean targets with ldflags version injection - .golangci.yml: enable errcheck, govet, staticcheck, gosimple, ineffassign, unused, misspell, gofmt, goimports - .github/workflows/ci.yml: GitHub Actions CI running build + vet + tests (with -race) across Go 1.24/1.26, plus a golangci-lint job - .gitignore: build artifacts, test outputs, editor cruft, and local config overrides (never committed) Verified locally: go build, go vet, gofmt clean, binary prints version.
36 lines
724 B
Makefile
36 lines
724 B
Makefile
BINARY := gitflow
|
|
MODULE := gitea.oblak.solutions/dimitar/gitFlow
|
|
VERSION ?= dev
|
|
LDFLAGS := -ldflags "-X $(MODULE)/internal/version.Version=$(VERSION)"
|
|
|
|
.PHONY: build test fmt vet lint install clean
|
|
|
|
## build: compile the gitflow binary into the repo root
|
|
build:
|
|
go build $(LDFLAGS) -o $(BINARY) ./cmd/gitflow
|
|
|
|
## test: run the full test suite
|
|
test:
|
|
go test ./...
|
|
|
|
## fmt: format all Go sources
|
|
fmt:
|
|
gofmt -l -w .
|
|
|
|
## vet: run go vet over all packages
|
|
vet:
|
|
go vet ./...
|
|
|
|
## lint: run golangci-lint (requires golangci-lint on PATH)
|
|
lint:
|
|
golangci-lint run
|
|
|
|
## install: install gitflow into GOBIN
|
|
install:
|
|
go install $(LDFLAGS) ./cmd/gitflow
|
|
|
|
## clean: remove build artifacts
|
|
clean:
|
|
rm -f $(BINARY)
|
|
rm -f coverage.out
|