diff options
| author | user <user@clank> | 2026-08-27 16:27:13 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-27 16:27:13 +0200 |
| commit | 21a2a39a3b27ff4625bbc1d89220fa83e923ecf8 (patch) | |
| tree | af6eb063647ff76bff3b283dd5553e75faf66243 /Makefile | |
| parent | install docs: one subsection per OS (diff) | |
| download | slosh-21a2a39a3b27ff4625bbc1d89220fa83e923ecf8.tar.gz slosh-21a2a39a3b27ff4625bbc1d89220fa83e923ecf8.tar.xz slosh-21a2a39a3b27ff4625bbc1d89220fa83e923ecf8.zip | |
vendor build: pass ghostty its own version, not our tagsv0.1.0
The vendored tree has no .git, so upstream's version detection runs
git describe in *our* repository -- and the moment this repo grew its
first release tag (v0.1.0), ghostty's build refused it: 'tagged
releases must be in vX.Y.Z format matching build.zig'. Our v0.1.0 is
not ghostty's 1.3.2-dev, and upstream is right not to let a stranger's
tag name its build.
-Dversion-string is upstream's own escape hatch for exactly this. The
value is read from the vendored build.zig.zon rather than written here,
so a re-vendor updates it in the one place it already lives. Both
invocations (the host vendor target and the cross-built release legs)
get it through one VT_FLAGS.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -114,8 +114,18 @@ $(VT_LIB): # PATH -- but on a machine with only the Command Line Tools (no full Xcode) # that xcodebuild is a stub that fails, so the auto-detect turns a working # build into a broken one. We never consume the xcframework, so disable it. +# +# -Dversion-string: the vendored tree has no .git of its own, so upstream's +# version detection runs `git describe` in *our* repository and finds *our* +# tags -- and a slosh release tag (v0.1.0) is not a ghostty version, which +# upstream treats as a fatal mismatch. Passing the version from its own +# build.zig.zon is what the fallback would have computed, read from the one +# place a re-vendor updates. +VT_VERSION := $(shell sed -n 's/^[[:space:]]*\.version = "\([^"]*\)".*/\1/p' $(VT)/build.zig.zon | head -1) +VT_FLAGS := -Demit-lib-vt -Demit-xcframework=false -Dversion-string=$(VT_VERSION) -Doptimize=ReleaseFast + vendor: ## build the vendored libghostty-vt (needs zig 0.16) - cd $(VT) && PATH="$(dir $(ZIG)):$$PATH" zig build -Demit-lib-vt -Demit-xcframework=false -Doptimize=ReleaseFast + cd $(VT) && PATH="$(dir $(ZIG)):$$PATH" zig build $(VT_FLAGS) TEST_BIN := build/input_test @@ -380,8 +390,7 @@ release-linux: build/version.h build/logo.h ## cross-build the static linux tarb vtpfx=build/vt/$$t; vta=$$vtpfx/lib/libghostty-vt.a; \ odir=build/obj/$$t; stage=build/stage/$$stem; \ printf ' %-5s %s\n' '[VT]' "$$t"; \ - ( cd $(VT) && PATH="$(dir $(ZIG)):$$PATH" zig build \ - -Demit-lib-vt -Demit-xcframework=false -Doptimize=ReleaseFast \ + ( cd $(VT) && PATH="$(dir $(ZIG)):$$PATH" zig build $(VT_FLAGS) \ -Dtarget=$$t --prefix "$(CURDIR)/$$vtpfx" ); \ mkdir -p $$odir; \ for c in $(SRC); do \ |
