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 several APIs to build-cli #11705
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
f1ab312
to
969c4ee
Compare
969c4ee
to
7b3d3fd
Compare
build-tools/packages/build-cli/test/commands/generate/buildVersion.test.ts
Outdated
Show resolved
Hide resolved
|
This commit is queued for merging with the |
…state machine to govern logic (#11706) Follow up to #11705. - Adds an abstract base command class for commands that use state machines. This base command contains the scaffolding for commands that have internal state machines, including some logging for each state transition and handling the Init and Failed states. - Adds various interfaces and types for working with the state machine. - Adds the Fluid Unified Release Process finite state machine, which is used by the `release` command. This PR also implements the `release` command, 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. The basic flow of the command is: - The command starts and oclif (our CLI infrastructure) parses flags and arguments, validates them, etc. - The command's _run_ method is called, which calls an internal _stateLoop_ function. - That function loops through the machine states, passing each state to the command's state handler function. - The state handler handles the states it knows about, and if it doesn't handle the state, it passes it to its parent's state handler. Thus, the parent classes are relevant to the overall implementation of the state handling. In previous iterations there was a deeper class hierarchy, but now there's just one base abstract state machine command and the release command that inherits from it. Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
Follow up to #11692.
Adds APIs for:
These APIs will be used heavily in the
releaseandrelease reportcommands (future PRs).