Skip to content

Conversation

@erickzhao
Copy link
Member

  • Automates the git operations required for lerna:version.
  • Changes the target of publish.yml from next to ${{ github.sha }}.
  • Updates release documentation in CONTRIBUTING.md according to the new release flow.

@erickzhao erickzhao requested a review from a team as a code owner December 4, 2025 19:29
@erickzhao erickzhao added the next label Dec 4, 2025
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>'",
Copy link
Member

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.

Copy link
Member Author

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:

  1. Having dirty git state will bail early.
  2. Rejecting the lerna version changes will bail early.
  3. Branch and commit are created appropriately if we reach script completion.

@erickzhao erickzhao requested a review from dsanders11 December 4, 2025 20:40
Copy link
Member

@VerteDinde VerteDinde left a 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! 🙏

@erickzhao erickzhao merged commit 087d40c into next Dec 4, 2025
18 of 19 checks passed
@erickzhao erickzhao deleted the lerna-version-script-improvement branch December 4, 2025 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants