Getting set for release
This commit is contained in:
18
Makefile
18
Makefile
@@ -1,22 +1,23 @@
|
||||
.PHONY: help build-macos build-linux
|
||||
.PHONY: help build-macos build-linux release
|
||||
|
||||
help:
|
||||
@echo "Story Kit – cross-platform build targets"
|
||||
@echo ""
|
||||
@echo " make build-macos Build native macOS release binary"
|
||||
@echo " make build-linux Build static Linux x86_64 release binary (requires cross + Docker)"
|
||||
@echo " make release V=x.y.z Build both targets and publish a Gitea release"
|
||||
@echo ""
|
||||
@echo "Prerequisites:"
|
||||
@echo " build-macos: Rust stable toolchain, pnpm"
|
||||
@echo " build-linux: cargo install cross AND Docker Desktop running"
|
||||
@echo ""
|
||||
@echo "Output:"
|
||||
@echo " macOS : target/release/story-kit-server"
|
||||
@echo " Linux : target/x86_64-unknown-linux-musl/release/story-kit-server"
|
||||
@echo " macOS : target/release/story-kit"
|
||||
@echo " Linux : target/x86_64-unknown-linux-musl/release/story-kit"
|
||||
|
||||
## Build a native macOS release binary.
|
||||
## The frontend is compiled by build.rs (pnpm build) and embedded via rust-embed.
|
||||
## Verify dynamic deps afterwards: otool -L target/release/story-kit-server
|
||||
## Verify dynamic deps afterwards: otool -L target/release/story-kit
|
||||
build-macos:
|
||||
cargo build --release
|
||||
|
||||
@@ -26,3 +27,12 @@ build-macos:
|
||||
## The resulting binary has zero dynamic library dependencies (ldd reports "not a dynamic executable").
|
||||
build-linux:
|
||||
cross build --release --target x86_64-unknown-linux-musl
|
||||
|
||||
## Publish a release to Gitea with macOS and Linux binaries.
|
||||
## Requires: GITEA_TOKEN env var, cross, Docker running.
|
||||
## Usage: make release V=0.2.0
|
||||
release:
|
||||
ifndef V
|
||||
$(error Usage: make release V=x.y.z)
|
||||
endif
|
||||
script/release $(V)
|
||||
|
||||
Reference in New Issue
Block a user