Skip to content

Commit ddc1d91

Browse files
committed
fix(release): fetch tags before resolving version for reusable builds
1 parent 4791591 commit ddc1d91

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

scripts/release/artifacts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export async function updateArtifacts(opts: ReleaseOpts) {
3838
let sourceCommit = opts.commit;
3939
if (opts.reuseEngineVersion) {
4040
console.log(`==> Reusing artifacts from version ${opts.reuseEngineVersion}`);
41+
// Fetch tags to ensure we have the version tag
42+
console.log(`==> Fetching tags...`);
43+
await $({ stdio: "inherit" })`git fetch --tags`;
4144
const result = await $`git rev-parse v${opts.reuseEngineVersion}`;
4245
sourceCommit = result.stdout.trim().slice(0, 7);
4346
console.log(`==> Source commit: ${sourceCommit}`);

scripts/release/docker.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export async function tagDocker(opts: {
1515
let sourceCommit = opts.commit;
1616
if (opts.reuseEngineVersion) {
1717
console.log(`==> Reusing artifacts from version ${opts.reuseEngineVersion}`);
18+
// Fetch tags to ensure we have the version tag
19+
console.log(`==> Fetching tags...`);
20+
await $({ stdio: "inherit" })`git fetch --tags`;
1821
const result = await $`git rev-parse v${opts.reuseEngineVersion}`;
1922
sourceCommit = result.stdout.trim().slice(0, 7);
2023
console.log(`==> Source commit: ${sourceCommit}`);

0 commit comments

Comments
 (0)