-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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): support groupPreVersionCommand for release groups #27474
feat(release): support groupPreVersionCommand for release groups #27474
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit ffb0d79. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 4 targets
Sent with 💌 from NxCloud. |
This comment was marked as resolved.
This comment was marked as resolved.
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.
Given some feedback on X
cdf725e
to
d254b0d
Compare
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.
Still pending the discussed updates
Updated the PR title to match what will be coming to the PR |
f9816c9
to
0e507f6
Compare
} | ||
``` | ||
|
||
The `groupPreVersionCommand` will run in addition of the global `preVersionCommand`. |
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.
The `groupPreVersionCommand` will run in addition of the global `preVersionCommand`. | |
The `groupPreVersionCommand` will run in addition to the global `preVersionCommand`. |
@@ -355,8 +356,16 @@ export async function createNxReleaseConfig( | |||
); | |||
|
|||
// these options are not supported at the group level, only the root/command level | |||
const rootVersionWithoutGlobalOptions = { ...rootVersionConfig }; | |||
const rootVersionWithoutGlobalOptions = { |
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.
You left this underneath the comment saying it is not something which is supported at the group level, which doesn't make sense, but more broadly why are you creating a relationship between preVersionCommand and groupPreVersionCommand?
They are separate things, right now the way you have things it looks like if you set a preVersionCommand it will be run twice, once as a preVersionCommand and once as a groupPreVersionCommand?
Please remove this relationship
@@ -3313,6 +3331,7 @@ describe('createNxReleaseConfig()', () => { | |||
"conventionalCommits": false, | |||
"generator": "@nx/js:release-version", | |||
"generatorOptions": {}, | |||
"groupPreVersionCommand": "nx run-many -t build", |
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.
This confirms what I said in my previous comment - this should not be set in this example, we do not want the command to be duplicated from global pre to group pre
Thank you @jogelin! |
) (cherry picked from commit 71fe65f)
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. |
Current Behavior
In Nx release configuration, the property
preVersionCommand
can be set only at the root level in thenx.json
:It is not possible to specify it per group meaning that if we want to release only one group, we have to build all releasable projects.
Expected Behavior
We should be able to specify
preVersionCommand
per group:In that way, we can align the list of projects related to the group and the list of projects to build