check / check (push) Waiting to run
static/js/alpine.min.js is now committed: package/dist/cdn.min.js from the @alpinejs/csp 3.14.9 npm package, byte for byte, taken once from the package file that was in 3p/. The build no longer unpacks it, so script/assets, the assets make target, its Dockerfile steps and the ignore entries for the file are gone, and so is the package file. Prettier and ESLint both ignore the file, so it stays as published. Comments and the README now describe the committed file. Model: opus-5-5
77 lines
1.6 KiB
Makefile
77 lines
1.6 KiB
Makefile
.PHONY: bootstrap setup test test-browser lint fmt fmt-check check build run dev deps docker clean hooks css css-check version
|
|
|
|
# Default target
|
|
.DEFAULT_GOAL := check
|
|
|
|
# Version stamped into the binary. Derived from git by script/version;
|
|
# override it (`make build VERSION=v1.2.3`) to stamp a given value, which is
|
|
# how the Dockerfile passes its build arg in.
|
|
VERSION ?= $(shell script/version)
|
|
|
|
# An empty override (`make build VERSION=`, or the Dockerfile's `make build
|
|
# VERSION="$VERSION"` when no VERSION build arg was given) means unset,
|
|
# exactly as it does in script/version -- stamping "" would leave the binary
|
|
# reporting no version and the footer back on its "dev" fallback. `override`
|
|
# is required: a plain assignment loses to the command-line definition it
|
|
# exists to correct.
|
|
override VERSION := $(or $(strip $(VERSION)),$(shell script/version))
|
|
|
|
bootstrap:
|
|
@script/bootstrap
|
|
|
|
setup:
|
|
@script/setup
|
|
|
|
test:
|
|
@script/test
|
|
|
|
test-browser:
|
|
@script/test-browser
|
|
|
|
lint:
|
|
@script/lint
|
|
|
|
fmt:
|
|
@script/fmt
|
|
|
|
fmt-check:
|
|
@script/fmt-check
|
|
|
|
check:
|
|
@script/check
|
|
|
|
# Built with cgo off, -trimpath and -s -w, as the Go Dockerfile in
|
|
# REPO_POLICIES.md does: the binary carries no build paths, symbol table or
|
|
# debug information, and on Linux, the image's included, it is statically
|
|
# linked.
|
|
build:
|
|
CGO_ENABLED=0 go build -trimpath -ldflags '-s -w -X main.version=$(VERSION)' -o bin/webhooker ./cmd/webhooker
|
|
|
|
run: build
|
|
./bin/webhooker
|
|
|
|
dev:
|
|
go run ./cmd/webhooker
|
|
|
|
deps:
|
|
go mod download
|
|
go mod tidy
|
|
|
|
version:
|
|
@echo $(VERSION)
|
|
|
|
docker:
|
|
@script/docker
|
|
|
|
clean:
|
|
rm -rf bin/
|
|
|
|
hooks:
|
|
@script/install-precommit
|
|
|
|
css:
|
|
@script/css
|
|
|
|
css-check:
|
|
@script/css-check
|