Replies: 1 comment
-
So I think I'm leaning towards a custom executor which is mostly copy-paste of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think I have a fairly simple/basic release needs and want to use
nx release
for it.I have a lib (custom plugin) in
libs/nx-plugin
.I want to build, version and publish it and have the following requirements:
package.json
should be updated (So we're looking at Scenario 1 with priority)conventionalCommits: true
Relevant nx.json props:
Relevant library project.json props:
Having the above in mind I will outline how each scenario from https://nx.dev/recipes/nx-release/updating-version-references falls apart:
Scenario 1 a)
Source
package.json
is updated butpreVersionCommand
built the dist folder with the old package.json. As a result, the published package.json contains the previous version.Scenario 1 b)
As a follow up to 1 a) I saw this comment which recommends to use the subcommands and run build after version.
This is almost what I need except that
nx release changelog
doesn't seem to work with conventional commits when used directly. It requires a argument and complains withAn explicit target version must be specified when using the changelog command directly
.Scenario 1 c)
If we remove this part
we have source package.json updated and published with the new version but the published artifacts contain the whole project including the source files.
Scenario 2
Doesn't work for me as I prefer to have visibility of the version in the source package.json We do not have a strict requirement about this but I do not understand why I wouldn't need the "main" package.json be up-to-date. Looks confusing to me, surely to other team members. Can someone elaborate why you would ever prefer this?
Scenario 3
That's not even a scenario but more of an optimization that you can benefit from if you're using pnpm (which we are not).
Beta Was this translation helpful? Give feedback.
All reactions