mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 11:04:58 +00:00
fix: bake version into binary at build time
Instead of hacking around the version in the Node.js wrapper script, properly pass the version at build time via SANDBOX_AGENT_VERSION env var. Changes: - build.rs: Generate version.rs with VERSION constant from env var - main.rs: Use generated version constant for clap --version - Dockerfiles: Accept SANDBOX_AGENT_VERSION as build arg - build.sh: Pass version as second argument to Docker builds - release.yaml: Pass version to build script during CI - Remove version hack from sdks/cli/bin/sandbox-agent wrapper The version is now baked into the binary during the release build, ensuring --version reports the correct npm package version.
This commit is contained in:
parent
93445b3d4f
commit
de139a7601
9 changed files with 56 additions and 22 deletions
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
|
@ -125,8 +125,8 @@ jobs:
|
|||
# Use Docker BuildKit
|
||||
export DOCKER_BUILDKIT=1
|
||||
|
||||
# Build the binary using our Dockerfile
|
||||
docker/release/build.sh ${{ matrix.target }}
|
||||
# Build the binary using our Dockerfile with version
|
||||
docker/release/build.sh ${{ matrix.target }} ${{ github.event.inputs.version }}
|
||||
|
||||
# Make sure dist directory exists and binary is there
|
||||
ls -la dist/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue