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
build-tools: Add release command and support for commands that use a state machine to govern logic #11706
Conversation
|
|
||
| if (releaseGroupOrPackage instanceof MonoRepo) { | ||
| workingDir = releaseGroupOrPackage.repoPath; | ||
| cmd = `npx lerna version ${translatedVersion.version} --no-push --no-git-tag-version -y && npm run build:genver`; |
Check warning
Code scanning / CodeQL
Unsafe shell command constructed from library input
| cmd = `npx lerna version ${translatedVersion.version} --no-push --no-git-tag-version -y && npm run build:genver`; | ||
| } else { | ||
| workingDir = releaseGroupOrPackage.directory; | ||
| cmd = `npm version ${translatedVersion.version}`; |
Check warning
Code scanning / CodeQL
Unsafe shell command constructed from library input
fb9a5e3
to
bce17be
Compare
|
|
||
| this.releaseGroup = flags.releaseGroup ?? flags.package!; | ||
| this.releaseVersion = context.getVersion(this.releaseGroup); | ||
| this.bumpType = flags.bumpType as VersionBumpType; |
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.
Should we do validation on these to ensure they are well formed?
| sections: [ | ||
| { | ||
| title: "FIRST", | ||
| message: `Commit the local changes and create a PR targeting the ${context.originalBranchName} branch.\n\nAfter the PR is merged, then the release of ${this.releaseGroup} is complete!`, |
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: looks like this string is duplicated below. Can we share a getter property or something?
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
|
This commit is queued for merging with the |
Follow up to #11705.
releasecommand.This PR also implements the
releasecommand, which is used to ensure that a release branch is in good condition, then walks the user through the release.The release process and state machine
The release process itself is described by a state machine. This is a visual representation:
The basic flow of the command is:
Reviewer guidance
I would particular like feedback on:
Anything big will be punted to a follow-up PR so I can get this baseline in.