-
Notifications
You must be signed in to change notification settings - Fork 63
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
Patch environment variable randomly does not get populated #1035
Comments
In your example, the Patch has the value '0' and probably that is the problem, it does but get set in the environment variable |
This wasn't an issue until now, and as mentioned, it is random. |
I have the same issue since the 0.11.0 release. Not an issue with 0.10.2. |
Experiencing this as well. |
I can confirm that it doesn't matter which variable contains value It seems as it uses the same logic as Release 0.11.0{
"Major": 2,
"Minor": 1,
"Patch": 0,
"BuildMetaData": null,
"BuildMetaDataPadded": "",
"FullBuildMetaData": "Branch.pull-1502-merge.Sha.54a788de07b6e63151fcba11361f58320bed2998",
"MajorMinorPatch": "2.1.0",
"SemVer": "2.1.0-PullRequest1502.53",
"LegacySemVer": "2.1.0-PullRequest1502-53",
"LegacySemVerPadded": "2.1.0-PullRequest1502-0053",
"AssemblySemVer": "2.1.0.0",
"AssemblySemFileVer": "2.1.0.0",
"FullSemVer": "2.1.0-PullRequest1502.53",
"InformationalVersion": "2.1.0-PullRequest1502.53+Branch.pull-1502-merge.Sha.54a788de07b6e63151fcba11361f58320bed2998",
"BranchName": "pull/1502/merge",
"EscapedBranchName": "pull-1502-merge",
"Sha": "54a788de07b6e63151fcba11361f58320bed2998",
"ShortSha": "54a788d",
"NuGetVersionV2": "2.1.0-pullrequest1502-0053",
"NuGetVersion": "2.1.0-pullrequest1502-0053",
"NuGetPreReleaseTagV2": "pullrequest1502-0053",
"NuGetPreReleaseTag": "pullrequest1502-0053",
"VersionSourceSha": "8e52635345050c89f012521eefe8a4a3ca2b0c2a",
"CommitsSinceVersionSource": 53,
"CommitsSinceVersionSourcePadded": "0053",
"UncommittedChanges": 0,
"CommitDate": "2024-02-29"
} GITVERSION_ASSEMBLYSEMFILEVER=2.1.0.0
GITVERSION_ASSEMBLYSEMVER=2.1.0.0
GITVERSION_BRANCHNAME=pull/1502/merge
GITVERSION_BUILDMETADATA=
GITVERSION_BUILDMETADATAPADDED=
GITVERSION_COMMITDATE=2024-02-29
GITVERSION_COMMITSSINCEVERSIONSOURCE=53
GITVERSION_COMMITSSINCEVERSIONSOURCEPADDED=0053
GITVERSION_ESCAPEDBRANCHNAME=pull-1502-merge
GITVERSION_FULLBUILDMETADATA=Branch.pull-1502-merge.Sha.54a788de07b6e63151fcba11361f58320bed2998
GITVERSION_FULLSEMVER=2.1.0-PullRequest1502.53
GITVERSION_INFORMATIONALVERSION=2.1.0-PullRequest1502.53+Branch.pull-1502-merge.Sha.54a788de07b6e63151fcba11361f58320bed2998
GITVERSION_LEGACYSEMVER=2.1.0-PullRequest1502-53
GITVERSION_LEGACYSEMVERPADDED=2.1.0-PullRequest1502-0053
GITVERSION_MAJOR=2
GITVERSION_MAJORMINORPATCH=2.1.0
GITVERSION_MINOR=1
GITVERSION_NUGETPRERELEASETAG=pullrequest1502-0053
GITVERSION_NUGETPRERELEASETAGV2=pullrequest1502-0053
GITVERSION_NUGETVERSION=2.1.0-pullrequest1502-0053
GITVERSION_NUGETVERSIONV2=2.1.0-pullrequest1502-0053
GITVERSION_PATCH=
GITVERSION_PRERELEASELABEL=PullRequest1502
GITVERSION_PRERELEASELABELWITHDASH=-PullRequest1502
GITVERSION_PRERELEASENUMBER=53
GITVERSION_PRERELEASETAG=PullRequest1502.53
GITVERSION_PRERELEASETAGWITHDASH=-PullRequest1502.53
GITVERSION_SEMVER=2.1.0-PullRequest1502.53
GITVERSION_SHA=54a788de07b6e63151fcba11361f58320bed2998
GITVERSION_SHORTSHA=54a788d
GITVERSION_UNCOMMITTEDCHANGES=
GITVERSION_VERSIONSOURCESHA=8e52635345050c89f012521eefe8a4a3ca2b0c2a
GITVERSION_WEIGHTEDPRERELEASENUMBER=30053 Release 0.10.2{
"Major": 2,
"Minor": 1,
"Patch": 0,
"PreReleaseTag": "alpha.47",
"PreReleaseTagWithDash": "-alpha.47",
"PreReleaseLabel": "alpha",
"PreReleaseLabelWithDash": "-alpha",
"PreReleaseNumber": 47,
"WeightedPreReleaseNumber": 47,
"BuildMetaData": null,
"BuildMetaDataPadded": "",
"FullBuildMetaData": "Branch.develop.Sha.62b349a2b409a166fbc65370ee35269611f05a35",
"MajorMinorPatch": "2.1.0",
"SemVer": "2.1.0-alpha.47",
"LegacySemVer": "2.1.0-alpha47",
"LegacySemVerPadded": "2.1.0-alpha0047",
"AssemblySemVer": "2.1.0.0",
"AssemblySemFileVer": "2.1.0.0",
"FullSemVer": "2.1.0-alpha.47",
"InformationalVersion": "2.1.0-alpha.47+Branch.develop.Sha.62b349a2b409a166fbc65370ee35269611f05a35",
"BranchName": "develop",
"EscapedBranchName": "develop",
"Sha": "62b349a2b409a166fbc65370ee35269611f05a35",
"ShortSha": "62b349a",
"NuGetVersionV2": "2.1.0-alpha0047",
"NuGetVersion": "2.1.0-alpha0047",
"NuGetPreReleaseTagV2": "alpha0047",
"NuGetPreReleaseTag": "alpha0047",
"VersionSourceSha": "8e52635345050c89f012521eefe8a4a3ca2b0c2a",
"CommitsSinceVersionSource": 47,
"CommitsSinceVersionSourcePadded": "0047",
"UncommittedChanges": 0,
"CommitDate": "2024-01-31"
} GITVERSION_ASSEMBLYSEMFILEVER=2.1.0.0
GITVERSION_ASSEMBLYSEMVER=2.1.0.0
GITVERSION_BRANCHNAME=develop
GITVERSION_BUILDMETADATA=
GITVERSION_BUILDMETADATAPADDED=
GITVERSION_COMMITDATE=2024-01-31
GITVERSION_COMMITSSINCEVERSIONSOURCE=47
GITVERSION_COMMITSSINCEVERSIONSOURCEPADDED=0047
GITVERSION_ESCAPEDBRANCHNAME=develop
GITVERSION_FULLBUILDMETADATA=Branch.develop.Sha.62b349a2b409a166fbc65370ee35269611f05a35
GITVERSION_FULLSEMVER=2.1.0-alpha.47
GITVERSION_INFORMATIONALVERSION=2.1.0-alpha.47+Branch.develop.Sha.62b349a2b409a166fbc65370ee35269611f05a35
GITVERSION_LEGACYSEMVER=2.1.0-alpha47
GITVERSION_LEGACYSEMVERPADDED=2.1.0-alpha0047
GITVERSION_MAJOR=2
GITVERSION_MAJORMINORPATCH=2.1.0
GITVERSION_MINOR=1
GITVERSION_NUGETPRERELEASETAG=alpha0047
GITVERSION_NUGETPRERELEASETAGV2=alpha0047
GITVERSION_NUGETVERSION=2.1.0-alpha0047
GITVERSION_NUGETVERSIONV2=2.1.0-alpha0047
GITVERSION_PATCH=0
GITVERSION_PRERELEASELABEL=alpha
GITVERSION_PRERELEASELABELWITHDASH=-alpha
GITVERSION_PRERELEASENUMBER=47
GITVERSION_PRERELEASETAG=alpha.47
GITVERSION_PRERELEASETAGWITHDASH=-alpha.47
GITVERSION_SEMVER=2.1.0-alpha.47
GITVERSION_SHA=62b349a2b409a166fbc65370ee35269611f05a35
GITVERSION_SHORTSHA=62b349a
GITVERSION_UNCOMMITTEDCHANGES=0
GITVERSION_VERSIONSOURCESHA=8e52635345050c89f012521eefe8a4a3ca2b0c2a
GITVERSION_WEIGHTEDPRERELEASENUMBER=47
GIT_TERMINAL_PROMPT=0 |
@Amasis thanks for the examples, I will check the code that sets these env vars. The change should be done here actions/src/tools/gitversion/tool.ts Line 78 in 823eaef
|
It seems like in azure pipelines the I think you should check for the empty value and replace with |
#1035 - fix the way value '0' is set in output and environment variables
Hi,
since the latest version we are experiencing a strange RANDOM behavior in gitversion/execute@0 task.
The output of the task correctly lists value of the Patch version
However, when we list environment variables to the machine, all the PATCH variables are empty:
As stated above, this happens randomly, rerun sometimes fixes this.
The text was updated successfully, but these errors were encountered: