Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): fix commit parsing logic #336

Merged
merged 3 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
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}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As explained above, we need to remove the local tag, and fetch it from the remote.

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(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just gardening.

`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