-
Notifications
You must be signed in to change notification settings - Fork 17
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: automate release #120
Conversation
This reverts commit cdd385c.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly implementation details comments, but this looks solid!
config.json
Outdated
@@ -0,0 +1,8 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we put it at the root of the repository we could maybe have a more descriptive name, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we release this actual repo or just the one generated ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't release it, it's just publicly available but we already have a few configs everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we put it at the root of the repository we could maybe have a more descriptive name, wdyt?
I actually wrapped it with the key "release" for the reason. What do you think? Should we have a separate "release.config.json"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think of user use cases of this config, it's fine to keep it like that, otherwise yep it would make sense to have a release.config.json
file only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insane work !
config.json
Outdated
@@ -0,0 +1,8 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we release this actual repo or just the one generated ?
scripts/release/process-release.js
Outdated
].additionalProperties.packageVersion = versionsToRelease[lang].next; | ||
} | ||
}); | ||
fs.writeFileSync('openapitools.json', JSON.stringify(json, null, 2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use fs/promises
pls ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these scripts already use a bunch of synchronous code like execa.commandSync
. If we go with fs/promises
, we need to go all in, but I'm not sure how it's beneficial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:kermittyping: congrats it looks really nice!!
config.json
Outdated
@@ -0,0 +1,8 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think of user use cases of this config, it's fine to keep it like that, otherwise yep it would make sense to have a release.config.json
file only
return; | ||
} | ||
|
||
if (commits.some((commit) => commit.message.includes('BREAKING CHANGE'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should note somewhere that introducing a breaking change requires our commit to contain it then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually comes from https://www.conventionalcommits.org/
Do you think we need the mention somewhere in readme or contribution guide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a small md
file in the doc
folder describing commits
and semantic titles
, but this could be done in a later task (let's add it to our backlog still)
|
||
dotenv.config(); | ||
|
||
function getMarkdownSection(markdown: string, title: string): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it's worth having test for such scripts? I feel like the complexity requires it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not needed in this PR of course)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have such code once or twice again, then we could setup jest, I guess. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep I think it would help us especially if we encounter edge cases in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good for a first iteration of this release process, congrats!
Could you please add those 2 tickets to our backlog?
- Add doc about commits and semantic PR titles
- Write basic tests for this release process
Don't hesitate to do more testing on this repository (even if it floods the issue), so we can see how it behaves in detail.
🧭 What and Why
🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-297
Changes included:
yarn release
creates a release issue.scripts/release/process-release.js
is run, and updates versions and changelogs.ScreenShot.2022-02-03.at.16.18.31-converted.2.mp4
TODO in another PRs
yarn generate ${lang}
is failing inprocess-release.js
. Investigate.Once done, we can prepare CI per repository.