-
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
[Bug] Target Default dependsOn
Not Work for nx-release-publish
#22720
Comments
[Bug] Target Default dependsOn Not Work for nx-release-publish nrwl/nx#22720
Hi @Char2sGu, the intended way to run some logic before a release is to leverage the e.g. you might want something like the following in your If you were to run a target only before the publishing step, then it would potentially overwrite what had already been done in the versioning and/or changelog generation steps which would could cause issues. By having this be a full command (instead of just a target name for example), it also allows you maximum flexibility to modify things however you need to in a specific way for releases. We'll get a dedicated guide up on the website for |
Sounds good. Thanks! |
@JamesHenry based on this issue and #21855 I don't understand where the paved road is for releasing projects with a build step. Using Is there a different way to achieve this workflow that I'm not seeing? Maybe running |
I didn't try |
@praxxis We usually use the changelog step to commit the files, not the version step, so don't encounter issues like you are saying with being "out of sync", is this an option for you as well? One really important point though - Nx intentionally has a programmatic API as a first class use case: https://nx.dev/features/manage-releases#using-the-programmatic-api-for-nx-release You can compose together the logic of |
I don't think this problem has been solved. I want to achieve the workflow that @praxxis mentions:
The build must happen after the commit because otherwise the package number will be out of date. Is writing a custom release script really the only way to do this? |
We did indeed end up writing a custom script to accomplish our workflow, based heavily on the one in edit: just wanted to say @JamesHenry the programmatic API was really easy to work with and I appreciate having it available from the start while everyone shakes our their use cases for |
Thanks @praxxis, that's super helpful! Bit of a dumb question but I can't figure out how to install the |
I'm not the original author but you should be able to use those imports with a recent version of Nx, we're running 17.3 |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Every package in my project needs to be built to produce the assets for publishing. Therefore, it is a required step to build the package before each
nx-release-publish
execution.However, I find that specifying the default
dependsOn
of thenx-release-publish
target does not take effect:nx.json
By "does not take effect", I mean:
build
target is not executed either when executing thenx-release-publish
target directly or when executing throughnx release
.Depends On
tab fornx-release-publish
has only^nx-release-publish
Expected Behavior
dependsOn
should take effect onnx-release-publish
.GitHub Repo
https://github.com/Char2sGu/reproduction-nx-release-publish-dependsOn
Steps to Reproduce
This repository is a fork of the official NPM Workspace Sample Project: https://github.com/nrwl/tuskydesign.git
nx release
, and you'll find thebuild
target not executed despite of being specified intargetDefaults
dependsOn
is not respected.Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: