-
-
Notifications
You must be signed in to change notification settings - Fork 609
build: improve version + publish flow #4078
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
Conversation
package.json
Outdated
| "build:watch": "tsc -b packages --watch", | ||
| "docs": "yarn build && typedoc", | ||
| "lerna:version": "lerna version prerelease --force-publish --preid=alpha --no-changelog --exact --no-git-tag-version --no-push", | ||
| "lerna:version": "git reset HEAD --hard && lerna version prerelease --force-publish --preid=alpha --no-changelog --exact --no-git-tag-version --no-push && git checkout -b alpha-release/(date +\"%y%m%d-%I-%M\") && git commit -a -m 'chore: version bump' -m '<trigger_release>'", |
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.
concern: I don't love having a destructive action (with no confirm step) in a script that someone could trigger without understanding that it's going to potentially wipe in-progress changes they have.
suggestion: Can we move this to a script that checks for in-progress changes and bails out (with explanation to the user) so that they can take appropriate action before continuing? It's a pattern we've used over at build-tools for these types of operations.
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.
Pushed up a few commits to test for git status --porcelain.
At this point, I moved everything into a tools/version.sh file to make control flow easier and to add user-facing logging.
Tested that:
- Having dirty git state will bail early.
- Rejecting the
lerna version changeswill bail early. - Branch and commit are created appropriately if we reach script completion.
VerteDinde
left a comment
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.
Looks amazing, thanks so much for writing the docs changes too! 🙏
lerna:version.publish.ymlfromnextto${{ github.sha }}.CONTRIBUTING.mdaccording to the new release flow.