diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-04-01 11:11:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 11:11:53 -0400 |
commit | 8ca4c1819f3e7a8716c68034e256355334d53b44 (patch) | |
tree | 007b97781844a69dcc99063d9d88379f466d595a /tools/release/01_bump_crate_versions.ts | |
parent | 7fec7c834cb504f35f1dd03a9a464e164b8e13d8 (diff) |
chore(ci): fix Releases.md creation and tag name (#14166)
Diffstat (limited to 'tools/release/01_bump_crate_versions.ts')
-rwxr-xr-x | tools/release/01_bump_crate_versions.ts | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/release/01_bump_crate_versions.ts b/tools/release/01_bump_crate_versions.ts index 70c92637e..c87be4591 100755 --- a/tools/release/01_bump_crate_versions.ts +++ b/tools/release/01_bump_crate_versions.ts @@ -78,17 +78,22 @@ async function getReleasesMdText() { } async function getGitLog() { - const lastVersion = semver.parse(originalCliVersion)!; - const lastVersionTag = `v${originalCliVersion}`; + const originalVersion = semver.parse(originalCliVersion)!; + const originalVersionTag = `v${originalCliVersion}`; // fetch the upstream tags await repo.gitFetchTags("upstream"); + // make the repo unshallow so we can fetch the latest tag + if (await repo.gitIsShallow()) { + await repo.gitFetchUnshallow("origin"); + } + // this means we're on the patch release const latestTag = await repo.gitLatestTag(); - if (latestTag === lastVersionTag) { + if (latestTag === originalVersionTag) { return await repo.getGitLogFromTags( "upstream", - lastVersionTag, + originalVersionTag, undefined, ); } else { @@ -96,8 +101,8 @@ async function getGitLog() { await repo.gitFetchHistory("upstream"); const lastMinorHistory = await repo.getGitLogFromTags( "upstream", - `v${lastVersion.major}.${lastVersion.minor}.0`, - lastVersionTag, + `v${originalVersion.major}.${originalVersion.minor}.0`, + originalVersionTag, ); const currentHistory = await repo.getGitLogFromTags( "upstream", |