-
Notifications
You must be signed in to change notification settings - Fork 733
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
feat: add api release preparation scripts, github release creation scripts #4704
feat: add api release preparation scripts, github release creation scripts #4704
Conversation
@@ -97,13 +97,13 @@ All notable changes to this project will be documented in this file. | |||
|
|||
* export tracer options ([#154](https://www.github.com/open-telemetry/opentelemetry-js-api/issues/154)) ([b125324](https://www.github.com/open-telemetry/opentelemetry-js-api/commit/b125324438fb2f24eb80c7c6673afc8cfc99575e)) | |||
|
|||
### [1.0.4](https://www.github.com/open-telemetry/opentelemetry-js-api/compare/v1.0.3...v1.0.4) (2021-12-18) | |||
## [1.0.4](https://www.github.com/open-telemetry/opentelemetry-js-api/compare/v1.0.3...v1.0.4) (2021-12-18) |
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.
Reviewer note: empty ###
sections are removed by the changelog prep script, so I'm aligning them here to ensure they don't get removed.
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.
LGTM with a couple nits.
scripts/get-version.js
Outdated
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')); | ||
|
||
if(packageJson.private === true || packageJson.private === 'true'){ | ||
console.log('Skipping version from private package at', packageJsonPath); |
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.
nit: Do you want these warning/error cases to use console.warn
so they go to stderr perhaps? Otherwise, if you hit the accidental error case, then npm run _github:draft_release:*
could result in weird args being sent to gh release create ...
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.
const fs = require('fs'); | ||
|
||
const changelog = fs.readFileSync(process.argv[2]).toString(); | ||
const firstReleaseNoteEntryExp = /^## \d+\.\d+\.\d\n.*?(?=^## )/ms; |
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 we add a comment describing the regex for future explorers?
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.
/easycla |
… is a version by checking against a regex
Which problem is this PR solving?
Adds a few more script for release-automation that I usually did by hand. Moving us closer to having a fully-automated solution.
This adds:
<
version ranges. Before this I used to manually update all dependencies, which was error-prone and tedious.A.B.C
is allowed^A.B.C
is allowed (default for instrumentation packages)>=A.B.C <X.Y.Z
is allowed (default for SDK packages)CHANGELOG.md
(up to 3 times per release), manually typing the release title and manually creating a tag.api/CHANGELOG.md
PR creation, publishing packages and publishing Github Releases remains manual.
Additional changes:
peer-api-check
to some packages where it was missingapi/CHANGELOG.md
to avoid having them removed by the automatic updating ofapi/CHANGELOG.md
Next steps:
How Has This Been Tested?