Files
webhooker/Makefile
T
clawbot 593c97ca50
check / check (push) Successful in 3m24s
Pin tailwindcss and check the committed stylesheet against it (closes #231)
make css now runs the Tailwind v4.2.1 standalone CLI in a docker build
stage, the binary pinned by sha256, instead of whatever tailwindcss is
on the host. A css-check stage, run by make check and required by the
image build, fails when static/css/tailwind.css differs from what make
css generates.

input.css now names its sources (the templates, app.js, and the Go file
that picks status colour classes) instead of letting Tailwind scan the
whole checkout, where words in Go code and docs became unused classes.
.btn-text is removed and tailwind.css regenerated; it only loses unused
rules.

Model: opus-5-5
2026-10-02 20:36:20 +00:00

81 lines
1.7 KiB
Makefile

.PHONY: bootstrap setup assets 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))
# Extra linker flags for the build target. The static relink in the
# Dockerfile adds -extldflags here rather than passing its own -ldflags,
# so composing flags cannot drop the version stamp.
GO_LDFLAGS ?=
bootstrap:
@script/bootstrap
setup:
@script/setup
assets:
@script/assets
test:
@script/test
test-browser:
@script/test-browser
lint:
@script/lint
fmt:
@script/fmt
fmt-check:
@script/fmt-check
check:
@script/check
build: assets
go build -ldflags '$(strip -X main.version=$(VERSION) $(GO_LDFLAGS))' -o bin/webhooker ./cmd/webhooker
run: build
./bin/webhooker
dev: assets
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