Skip to content

Commit

Permalink
chore(ci): fix commit parsing logic (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjae-lee authored Apr 6, 2022
1 parent 57e7ca0 commit f9317d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion scripts/release/create-release-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,16 @@ async function createReleaseIssue(): Promise<void> {
const commitsWithUnknownLanguageScope: string[] = [];
const commitsWithoutLanguageScope: string[] = [];

// Remove the local tag, and fetch it from the remote.
// We move the `released` tag as we release, so we need to make it up-to-date.
await run(`git tag -d ${RELEASED_TAG}`);
await run(
`git fetch origin refs/tags/${RELEASED_TAG}:refs/tags/${RELEASED_TAG}`
);

// Reading commits since last release
const latestCommits = (
await run(`git log --oneline ${RELEASED_TAG}..${MAIN_BRANCH}`)
await run(`git log --oneline --abbrev=8 ${RELEASED_TAG}..${MAIN_BRANCH}`)
)
.split('\n')
.filter(Boolean)
Expand Down
4 changes: 3 additions & 1 deletion scripts/release/process-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ async function processRelease(): Promise<void> {
await run(`git push`);

// remove old `released` tag
await run(`git fetch origin refs/tags/released:refs/tags/released`);
await run(
`git fetch origin refs/tags/${RELEASED_TAG}:refs/tags/${RELEASED_TAG}`
);
await run(`git tag -d ${RELEASED_TAG}`);
await run(`git push --delete origin ${RELEASED_TAG}`);

Expand Down

0 comments on commit f9317d5

Please sign in to comment.