Commit 54564b4
authored
fix(release-image): stamp stdlib/package.json with release version (#23393)
## Summary
The aztec node Docker image was returning `"dev"` from
`getNodeVersion()` in 4.3.0-rc.1. Root cause: PR #22941 switched
`getPackageVersion()` to read the version from
`yarn-project/stdlib/package.json`, but `release-image/Dockerfile` was
only updated to stamp `.release-please-manifest.json` (which the old
implementation consumed). `stdlib/package.json` kept the `0.1.0`
placeholder inside the image, which `getPackageVersion()` substitutes
with `DEV_VERSION` (`"dev"`).
This adds a second stamp step in the Dockerfile that rewrites `.version`
in `yarn-project/stdlib/package.json` using `jq` (already installed in
the release-image base). The existing `.release-please-manifest.json`
stamp is left alone for now since other tooling may still consume it.
Only `stdlib/package.json` needs stamping for the version-reporting bug:
`getPackageVersion()` resolves `../../package.json` from
`stdlib/dest/update-checker/`, so it always reads the stdlib package
regardless of which CLI invokes it (`aztec --version`, `getNodeVersion`,
contract-artifact stamping, etc).
The npm publish path is unaffected — `ci3/deploy_npm` already calls
`ci3/release_prep_package_json` before `npm publish`, so npm consumers
got the correct version all along. The Docker path was the only release
surface that missed the rename.
## Test plan
- [ ] CI release-image build passes with the new `RUN jq …` step.
- [ ] Run the resulting image with `VERSION=4.3.0-rc.X` and confirm
`aztec --version` and a node's `getNodeVersion` RPC both return the
stamped version instead of `"dev"`.1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
0 commit comments