Skip to content
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(release): add 'git-tag' currentVersionResolver and conventional commits support #19267

Merged
merged 16 commits into from
Oct 26, 2023

Conversation

fahslaj
Copy link
Contributor

@fahslaj fahslaj commented Sep 21, 2023

  • Adds git-tag as a currentVersionResolver option for nx release version. This option will cause the current version for the release group to be taken from the most recent matching release tag, as configured with releaseTagPattern.

  • Adds support for using conventional commits to determine the specifier for the version bump. In this case, the nx release version command will look at git tags to determine which git ref to use as a base. Commits since the base will be parsed and any commits that touched files within any lib in the release group will be used to help determine the next version. Right now, only fix(...) and feat(...) are recognized, but breaking changes are recognized (fix(...)!: ...). If the previous version (from the git tag) is determined to be a prerelease, the bump type will always be prerelease. The user will need to promote prereleases to regular releases manually by passing an explicit specifier, which will override that obtained from conventional commits standards.

  • Uses npm config get registry to determine the default registry before falling back on https://registry.npmjs.org

  • Moves the specifier prompting into the version generator. This allows the current version determined in the generator to be used to determine the specifier when using conventional commits.

@vercel
Copy link

vercel bot commented Sep 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Oct 25, 2023 11:58pm

@fahslaj fahslaj requested a review from JamesHenry September 21, 2023 03:42
@fahslaj fahslaj marked this pull request as ready for review September 21, 2023 21:03
@fahslaj fahslaj force-pushed the feat/git-tag-conventional-commits branch from dcfb30b to f4627ec Compare October 3, 2023 02:17
@JamesHenry JamesHenry force-pushed the feat/git-tag-conventional-commits branch from 5d2a145 to a836c92 Compare October 3, 2023 13:38
@JamesHenry JamesHenry marked this pull request as draft October 3, 2023 13:46
@JamesHenry
Copy link
Collaborator

Setting to draft while we merge prerequisite PR and also figure out a couple of things

@fahslaj fahslaj force-pushed the feat/git-tag-conventional-commits branch 3 times, most recently from e07c492 to 3b94c7e Compare October 16, 2023 18:20
@fahslaj fahslaj force-pushed the feat/git-tag-conventional-commits branch from 3b94c7e to f788d9f Compare October 16, 2023 19:06
@fahslaj fahslaj force-pushed the feat/git-tag-conventional-commits branch from f788d9f to b91946c Compare October 16, 2023 19:26
@fahslaj fahslaj force-pushed the feat/git-tag-conventional-commits branch 6 times, most recently from fccfd31 to 3122420 Compare October 23, 2023 18:10
@fahslaj fahslaj marked this pull request as ready for review October 23, 2023 18:40
@fahslaj fahslaj force-pushed the feat/git-tag-conventional-commits branch 3 times, most recently from 62bfa95 to 98e1d7c Compare October 24, 2023 21:32
@fahslaj fahslaj force-pushed the feat/git-tag-conventional-commits branch from f3ae084 to d99c278 Compare October 25, 2023 16:52
Copy link
Collaborator

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Played with this locally today and found a couple things which we've patched and LGTM

@mandarini mandarini merged commit dbb73aa into nrwl:master Oct 26, 2023
2 checks passed
@fahslaj fahslaj deleted the feat/git-tag-conventional-commits branch October 26, 2023 14:59
Copy link

github-actions bot commented Nov 1, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants