Skip to content
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

[ISSUE]: Errors with NugetVersionV2 variable and FullSemVer #4120

Closed
2 tasks done
brianpendell opened this issue Jul 25, 2024 · 3 comments · Fixed by #4145
Closed
2 tasks done

[ISSUE]: Errors with NugetVersionV2 variable and FullSemVer #4120

brianpendell opened this issue Jul 25, 2024 · 3 comments · Fixed by #4145
Milestone

Comments

@brianpendell
Copy link

brianpendell commented Jul 25, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

GitVersion.Tool, GitVersion.MsBuild

GitVersion version

6.0.0

Operating system

Centos7

What are you seeing?

Attempt the command

dotnet-gitversion /nofetch /showvariable NuGetVersionV2 /updateassemblyinfo

Receive error
Unhandled exception. GitVersion.WarningException: /showvariable requires a valid version variable. Available variables are:
'Major', 'Minor', 'Patch', 'BuildMetaData', 'FullBuildMetaData', 'BranchName', 'EscapedBranchName', 'Sha', 'ShortSha', 'MajorMinorPatch', 'SemVer', 'FullSemVer', 'AssemblySemVer', 'AssemblySemFileVer', 'PreReleaseTag', 'PreReleaseTagWithDash', 'PreReleaseLabel', 'PreReleaseLabelWithDash', 'PreReleaseNumber', 'WeightedPreReleaseNumber', 'InformationalVersion', 'CommitDate', 'VersionSourceSha', 'CommitsSinceVersionSource', 'UncommittedChanges'

This worked in 5.2.0

Switching to FullSemVer variable, we attempt

dotnet-gitversion /showvariable FullSemVer /nofetch
And receive error

Unhandled exception. System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'git2-a418d9d' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-a418d9d: cannot open shared object file: No such file or directory

What is expected?

We should be able to retrieve the variable values without error.

Steps to Reproduce

We saw this as part of a Jenkins build running on CentOS 7. Hopefully, this can be reproduced directly from the console by simply executing
dotnet-gitversion /nofetch /showvariable NuGetVersionV2 /updateassemblyinfo
or
dotnet-gitversion /nofetch /showvariable FullSemVer /updateassemblyinfo

RepositoryFixture Test

No response

Output log or link to your CI build (if appropriate).

No response

@arturcic
Copy link
Member

Please see #2325

@rose-a
Copy link
Contributor

rose-a commented Aug 6, 2024

@arturcic could you please add the list of removed variables to the breaking changes document?

arturcic added a commit to arturcic/GitVersion that referenced this issue Aug 6, 2024

Verified

This commit was signed with the committer’s verified signature.
arturcic Artur
…d legacy output variables
arturcic added a commit that referenced this issue Aug 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
#4120 - update Breaking Changes
@arturcic arturcic added this to the 6.x milestone Aug 6, 2024
@arturcic arturcic linked a pull request Aug 6, 2024 that will close this issue
@arturcic arturcic modified the milestones: 6.x, 6.0.2 Aug 12, 2024
@arturcic
Copy link
Member

🎉 This issue has been resolved in version 6.0.2 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants