Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move git fetch --tags call to getMostRecentTag
  • Loading branch information
MajorLift committed Feb 8, 2024
commit d18d0fa42f288e4e29db1dc2e4e7ed37f0bf4148
5 changes: 3 additions & 2 deletions src/update-changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ async function getMostRecentTag({
}: {
tagPrefixes: [string, ...string[]];
}) {
// Ensure we have all tags on remote
await runCommand('git', ['fetch', '--tags']);

let mostRecentTagCommitHash: string | null = null;
for (const tagPrefix of tagPrefixes) {
const revListArgs = [
Expand Down Expand Up @@ -261,8 +264,6 @@ export async function updateChangelog({
packageRename,
});

// Ensure we have all tags on remote
await runCommand('git', ['fetch', '--tags']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is moved to getMostRecentTag().

const mostRecentTag = await getMostRecentTag({
tagPrefixes,
});
Expand Down