Repository navigation
nx release: version an app without bumping its package.json #37750
Hapshanko
started this conversation in
Feature Requests
Replies: 1 comment
|
If this gets an OK I will start working towards drafting a PR |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We have a few Node microservices under
apps/. They're never published, they only have apackage.jsonbecause Node needs one for the runtime deps when we build the Docker image.We use
nx releasewith conventional commits andgit.commit: trueto get a version, tag and changelog per service, which works great. The problem is that every release also bumps"version"inapps/<service>/package.json.Our Dockerfiles look roughly like this:
So every release changes
package.json, which busts the cache for thenpm cilayer and everything after it, even when no dependency changed. For an app that never gets published, that version field isn't used for anything. The version already lives in the git tag.I found
docker.skipVersionActions, which does pretty much exactly this, but it only works if you go through the whole Nx Docker release setup. We're not using that, we just want normal semver tags and changelogs. From what I can see in the source,manifestRootsToUpdate: []won't help either, since an empty array just falls back to the project root.Would it be possible to have the same thing as a regular version option? Something like:
The version would still be worked out from git tags and used for the tag and changelog, it just wouldn't get written back into
package.json.All reactions