check / check (push) Failing after 56s
script/build writes the version script/version prints into dist/package.json, which quak --version reports: the VERSION environment variable or build arg when one is given, otherwise git describe --tags --always, otherwise package.json's version. A checkout with .git whose version comes out empty, dev or unknown fails the build. .dockerignore no longer leaves out .git, and ARG VERSION has no default, so a plain docker build . of a clone stamps its commit. script/docker and script/cibuild still pass the host's version. make build-bin bundles the built dist/, so the single binary reports the same version. Model: opus-5-5
50 lines
724 B
Makefile
50 lines
724 B
Makefile
.PHONY: bootstrap setup test lint fmt fmt-check check build build-bin install dev clean docker hooks
|
|
|
|
YARN := yarn run
|
|
|
|
bootstrap:
|
|
@script/bootstrap
|
|
|
|
setup:
|
|
@script/setup
|
|
|
|
test:
|
|
@script/test
|
|
|
|
lint:
|
|
@script/lint
|
|
|
|
fmt:
|
|
@script/fmt
|
|
|
|
fmt-check:
|
|
@script/fmt-check
|
|
|
|
check:
|
|
@script/check
|
|
|
|
build:
|
|
@script/build
|
|
|
|
# Bundles the built dist/, so the binary reports the version script/build
|
|
# stamped.
|
|
build-bin: build
|
|
nix-shell -p bun --run "bun build dist/bin/quak.js --compile --outfile bin/quak"
|
|
|
|
install: build-bin
|
|
mkdir -p ~/bin
|
|
cp bin/quak ~/bin/quak
|
|
chmod +x ~/bin/quak
|
|
|
|
dev:
|
|
@$(YARN) tsc --watch
|
|
|
|
clean:
|
|
@rm -rf dist coverage .vitest-cache *.tsbuildinfo
|
|
|
|
docker:
|
|
@script/docker
|
|
|
|
hooks:
|
|
@script/install-precommit
|