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
Replace special chars in InformationalVersion with dashes #2014
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1f6c00a
#1520 Replace special chars in InformationalVersion by daches when a …
62baaa4
Merge branch 'master' into feature/issue-1520
Skoucail 08d0d1e
Resort using and fix format
Skoucail 8cacaf9
Reorder usings and fix format
Skoucail 8c41481
Remove space after namespace
Skoucail 5c57939
Move RegexReplace inside the CheckAndFormatString function
Skoucail 68eed55
Merge branch 'master' into feature/issue-1520
asbjornu fafe495
Merge branch 'master' into feature/issue-1520
asbjornu c44e411
Merge branch 'master' into feature/issue-1520
asbjornu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...iableProviderTests.ProvidesVariablesInContinuousDeliveryModeForFeatureBranch.approved.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"Major":1, | ||
"Minor":2, | ||
"Patch":3, | ||
"PreReleaseTag":"", | ||
"PreReleaseTagWithDash":"", | ||
"PreReleaseLabel":"", | ||
"PreReleaseNumber":"", | ||
"WeightedPreReleaseNumber":"", | ||
"BuildMetaData":5, | ||
"BuildMetaDataPadded":"0005", | ||
"FullBuildMetaData":"5.Branch.feature-123.Sha.commitSha", | ||
"MajorMinorPatch":"1.2.3", | ||
"SemVer":"1.2.3", | ||
"LegacySemVer":"1.2.3", | ||
"LegacySemVerPadded":"1.2.3", | ||
"AssemblySemVer":"1.2.3.0", | ||
"AssemblySemFileVer":"1.2.3.0", | ||
"FullSemVer":"1.2.3+5", | ||
"InformationalVersion":"1.2.3+5.Branch.feature-123.Sha.commitSha", | ||
"BranchName":"feature/123", | ||
"Sha":"commitSha", | ||
"ShortSha":"commitShortSha", | ||
"NuGetVersionV2":"1.2.3", | ||
"NuGetVersion":"1.2.3", | ||
"NuGetPreReleaseTagV2":"", | ||
"NuGetPreReleaseTag":"", | ||
"VersionSourceSha":"versionSourceSha", | ||
"CommitsSinceVersionSource":5, | ||
"CommitsSinceVersionSourcePadded":"0005", | ||
"CommitDate":"2014-03-06" | ||
} |
32 changes: 32 additions & 0 deletions
32
...nContinuousDeliveryModeForFeatureBranchWithCustomAssemblyInformationalFormat.approved.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"Major":1, | ||
"Minor":2, | ||
"Patch":3, | ||
"PreReleaseTag":"", | ||
"PreReleaseTagWithDash":"", | ||
"PreReleaseLabel":"", | ||
"PreReleaseNumber":"", | ||
"WeightedPreReleaseNumber":"", | ||
"BuildMetaData":5, | ||
"BuildMetaDataPadded":"0005", | ||
"FullBuildMetaData":"5.Branch.feature-123.Sha.commitSha", | ||
"MajorMinorPatch":"1.2.3", | ||
"SemVer":"1.2.3", | ||
"LegacySemVer":"1.2.3", | ||
"LegacySemVerPadded":"1.2.3", | ||
"AssemblySemVer":"1.2.3.0", | ||
"AssemblySemFileVer":"1.2.3.0", | ||
"FullSemVer":"1.2.3+5", | ||
"InformationalVersion":"1.2.3+5.Branch.feature-123.Sha.commitShortSha", | ||
"BranchName":"feature/123", | ||
"Sha":"commitSha", | ||
"ShortSha":"commitShortSha", | ||
"NuGetVersionV2":"1.2.3", | ||
"NuGetVersion":"1.2.3", | ||
"NuGetPreReleaseTagV2":"", | ||
"NuGetPreReleaseTag":"", | ||
"VersionSourceSha":"versionSourceSha", | ||
"CommitsSinceVersionSource":5, | ||
"CommitsSinceVersionSourcePadded":"0005", | ||
"CommitDate":"2014-03-06" | ||
} |
This file contains 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
This file contains 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
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.
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.
Is it not possible for
CheckAndFormatString
to perform theRegexReplace
? The problem can in theory occur forassemblyFileSemVer
andassemblySemVer
as well if their formats or schemes include the prerelease label (tag)?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.
Hmm.
I see someone removed the fields assembly-versioning-format and assembly-file-versioning-format from the documentation but not from the code.
I would say it not needed to move the regex because for assembly version and assembly file version the rules are way more restricting.
Basicly only the schemes described in
GitVersion/src/GitVersionCore/Extensions/AssemblyVersioningScheme.cs
Lines 5 to 9 in 0a64063
and
GitVersion/src/GitVersionCore/Extensions/AssemblyFileVersioningScheme.cs
Lines 5 to 9 in 0a64063
are allowed by Microsoft specs.
I guess that is also the reason why the fields are no longer in the documentation for GitVersion 4.x and 5.x.
Also see Microsoft docs
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.
Good point. Would moving the
RegexReplace
hurt, though? I would prefer it inside the method if it doesn't actually destroy anything.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.
Nop would not hurt i guess.
Just a theoretical performance hit. But i don't think that will be noticeable.
Edit: actually the performance would be better as the RegexReplace will only be executed if a format has been given. I committed the change