aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.macos
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-27 01:28:45 +0200
committeruser <user@clank>2026-08-27 01:28:45 +0200
commit5ba81343523e7b56a1514f2fc98f47973299b8f4 (patch)
tree002d3958474651ccf851157c76a953ecf3b6ea8f /Makefile.macos
parentadd LICENSE (MIT) and THIRD-PARTY-LICENSES (diff)
downloadslosh-5ba81343523e7b56a1514f2fc98f47973299b8f4.tar.gz
slosh-5ba81343523e7b56a1514f2fc98f47973299b8f4.tar.xz
slosh-5ba81343523e7b56a1514f2fc98f47973299b8f4.zip
release: one 'make release' for the three target binaries
Streamline the release into a single target that stages all three binaries in dist/ with a SHA256SUMS: linux x86_64 } cross-built here with 'zig cc -target ... -s', static musl linux aarch64 } (runs on any distro), packaged as a .tar.gz with the binary + README + LICENSE + THIRD-PARTY-LICENSES macos arm64 handed to 'macos-dist', which signs/notarizes on the builder zig is already the compiler, so the two linux cross-builds need no extra toolchain -- just the vendored libghostty-vt rebuilt per -Dtarget. Verified both: static, stripped (~2MB), and both run (aarch64 under qemu-user). Factor the version ladder out of the Makefile into contrib/version, and call it from both Makefile and Makefile.macos, so the linux tarballs, the signed zip and the binary's own --version are all named from the same tag instead of Makefile.macos using its own 'git describe --always' scheme (which would have named the mac artifact after a bare commit hash while linux used the tag). make release-linux # just the two linux tarballs make release REF=<tag> # all three + SHA256SUMS
Diffstat (limited to 'Makefile.macos')
-rw-r--r--Makefile.macos7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.macos b/Makefile.macos
index 4bce7d6..d53424b 100644
--- a/Makefile.macos
+++ b/Makefile.macos
@@ -68,8 +68,11 @@ MAINMAKE ?= $(MAKE) -f Makefile
BIN ?= build/slosh
DIST ?= dist
-# Version string for the artifact names. Matches the Makefile's scheme.
-VERSION ?= $(shell git describe --always --dirty 2>/dev/null || echo 0.0.0)
+# Version string for the artifact names. Derived by contrib/version, exactly as
+# the main Makefile does, so the signed zip's name matches the linux tarballs
+# and the binary's own --version. Runs on the builder, over the ref it checked
+# out, so a release names itself after that tag.
+VERSION ?= $(shell contrib/version)
ARCH ?= $(shell uname -m)
STEM := slosh-$(VERSION)-macos-$(ARCH)
ZIP := $(DIST)/$(STEM).zip