Skip to content

Commit a1a3fc9

Browse files
committed
Fetch all tags first before getting the latest one
1 parent 5aba295 commit a1a3fc9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/code-infra/src/utils/changelog.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ import { $ } from 'execa';
1919
* @returns {Promise<string>}
2020
*/
2121
export async function findLatestTaggedVersion(opts) {
22-
const { stdout } = await $({ cwd: opts.cwd })`git describe --tags --abbrev=0 --match ${'v*'}`; // only include "version-tags"
22+
const $$ = $({ cwd: opts.cwd });
23+
await $$`git fetch --tags`;
24+
const { stdout } = await $$`git describe --tags --abbrev=0 --match ${'v*'}`; // only include "version-tags"
2325
return stdout.trim();
2426
}
2527

0 commit comments

Comments
 (0)