check / check (push) Failing after 2s
script/lint-darwin (make lint-darwin; run by script/check, and its commands by the Dockerfile lint stage) runs go vet and golangci-lint with GOOS=darwin and cgo off. Compiling cgo for macOS needs Apple's SDK, so the three functions that call go-keychain, which is cgo there, move to keychainunlocker_cgo.go; a macOS build without cgo gets keychainunlocker_nocgo.go and the macse stub, whose errors name the missing macOS build with cgo. The rest of the keychain unlocker and its plain-Go tests are now checked; their findings are fixed without changing behaviour, and lines over 88 columns in the unchecked files are wrapped. Model: opus-5-5
54 lines
815 B
Makefile
54 lines
815 B
Makefile
export CGO_ENABLED=1
|
|
|
|
.PHONY: default bootstrap setup build test lint lint-darwin fmt fmt-check \
|
|
check docker docker-run clean install hooks
|
|
|
|
default: check
|
|
|
|
bootstrap:
|
|
@script/bootstrap
|
|
|
|
setup:
|
|
@script/setup
|
|
|
|
# Build ./secret; `make build VERSION=x` stamps x instead of `git describe`
|
|
build:
|
|
@script/build
|
|
|
|
test:
|
|
@script/test
|
|
|
|
fmt:
|
|
@script/fmt
|
|
|
|
lint:
|
|
@script/lint
|
|
|
|
# Type-check and lint the macOS build from Linux (see script/lint-darwin)
|
|
lint-darwin:
|
|
@script/lint-darwin
|
|
|
|
check:
|
|
@script/check
|
|
|
|
# Build Docker container
|
|
docker:
|
|
@script/docker
|
|
|
|
# Run Docker container interactively
|
|
docker-run:
|
|
docker run --rm -it "$$(./script/projectname)"
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
rm -f ./secret
|
|
|
|
install: build
|
|
cp ./secret $(HOME)/bin/secret
|
|
|
|
fmt-check:
|
|
@script/fmt-check
|
|
|
|
hooks:
|
|
@script/install-precommit
|