fix(release): use docker version in commit messages for docker-only releases#34489
Open
wmorland wants to merge 1 commit intonrwl:masterfrom
Open
fix(release): use docker version in commit messages for docker-only releases#34489wmorland wants to merge 1 commit intonrwl:masterfrom
wmorland wants to merge 1 commit intonrwl:masterfrom
Conversation
…eleases When performing a docker-only release (newVersion is null, dockerVersion is set), createCommitMessageValues() failed to include the version in commit messages. Three code paths passed null as the version or skipped docker-only projects entirely: - Single fixed group: passed null to ReleaseVersion constructor - Multi-group independent projects: skipped docker-only projects from bullet points - Multi-group fixed groups: skipped docker-only groups from bullet points Apply the same fallback pattern (newVersion ?? dockerVersion) that was already used for the single-independent-project case. Also fix createGitTagValues() dockerVersion guards to use loose inequality (!= null) instead of strict (!== null), since dockerVersion is typed as string | undefined, not string | null.
✅ Deploy Preview for nx-docs canceled.
|
✅ Deploy Preview for nx-dev canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
When performing a docker-only release (
newVersionis null,dockerVersionis set),createCommitMessageValues()failed to include the version in commit messages. Three code paths passed null as the version or skipped docker-only projects entirely:Expected Behavior
Apply fallback pattern (
newVersion ?? dockerVersion) where the code is just checkingnewVersioncurrently.Also fix
createGitTagValues()dockerVersion guards to use loose inequality (!= null) instead of strict (!== null), since dockerVersion is typed asstring | undefined, notstring | null.Testing
Added test cases to
packages/nx/src/command-line/release/utils/shared.spec.tsnpx nx formatnpx nx run nx:testpnpm check-commitRelated Issue(s)
I searched but could not find any issues filed for this. Please let me know if it is necessary to file one.