You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched issues to ensure it has not already been reported
GitVersion package
GitVersion.Tool
GitVersion version
6.0.1 and 6.0.2
Operating system
macOS
What are you seeing?
Hello, i tried upgrading gitversion 5.12 to 6.0.2 to use this new feature #3453, but there seems to be an issue using the parameters /url and /b. I also tried computing the version locally, and that works fine. The command docker run --rm -v $(pwd):/repo gittools/gitversion:6.0.2 /repo works correctly, but I rely heavily on the remote mode.
6.0.1 on develop with remote repository:
❯ docker run --rm gittools/gitversion:6.0.1 /url https://github.com/xpicio/compute-version.git /b develop
INFO [24-09-26 15:37:17:58] Applicable build agent found: 'LocalBuild'.
INFO [24-09-26 15:37:17:61] Working directory: /tools
INFO [24-09-26 15:37:17:62] Project root is: /tools
INFO [24-09-26 15:37:17:62] DotGit directory is: /tmp/compute-version/.git
INFO [24-09-26 15:37:17:62] Branch from build environment: develop
INFO [24-09-26 15:37:17:62] -< Begin: Creating dynamic repository at '/tmp/compute-version/.git' >-
INFO [24-09-26 15:37:17:63] -< Begin: Cloning repository from url 'https://github.com/xpicio/compute-version.git' >-
INFO [24-09-26 15:37:18:02] Returned path after repository clone: /tmp/compute-version/.git/
INFO [24-09-26 15:37:18:02] -< End: Cloning repository from url 'https://github.com/xpicio/compute-version.git' (Took: 392.82ms) >-
INFO [24-09-26 15:37:18:02] -< End: Creating dynamic repository at '/tmp/compute-version/.git' (Took: 395.21ms) >-
INFO [24-09-26 15:37:18:02] -< Begin: Normalizing git directory for branch 'develop' >-
INFO [24-09-26 15:37:18:03] -< End: Normalizing git directory for branch 'develop' (Took: 6.64ms) >-
ERROR [24-09-26 15:37:18:05] An unexpected error occurred:
System.ArgumentNullException: Value cannot be null. (Parameter 'path')
at LibGit2Sharp.Core.Ensure.ArgumentNotNull(Object argumentValue, String argumentName) in /_/LibGit2Sharp/Core/Ensure.cs:line 24
at LibGit2Sharp.Core.Ensure.ArgumentNotNullOrEmptyString(String argumentValue, String argumentName) in /_/LibGit2Sharp/Core/Ensure.cs:line 50
at LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options, RepositoryRequiredParameter requiredParameter) in /_/LibGit2Sharp/Repository.cs:line 149
at LibGit2Sharp.Repository..ctor(String path) in /_/LibGit2Sharp/Repository.cs:line 70
at GitVersion.Git.GitRepository.<>c__DisplayClass23_0.<DiscoverRepository>b__0() in /_/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs:line 37
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at GitVersion.Git.GitRepository.get_RepositoryInstance() in /_/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs:line 15
at GitVersion.Git.GitRepository.get_Head() in /_/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs:line 24
at GitVersion.GitPreparer.NormalizeGitDirectory(Boolean noFetch, String currentBranchName, Boolean isDynamicRepository) in /_/src/GitVersion.Core/Core/GitPreparer.cs:line 153
at GitVersion.GitPreparer.NormalizeGitDirectory(String targetBranch, Boolean isDynamicRepository) in /_/src/GitVersion.Core/Core/GitPreparer.cs:line 131
at GitVersion.GitPreparer.PrepareInternal(GitVersionOptions gitVersionOptions) in /_/src/GitVersion.Core/Core/GitPreparer.cs:line 55
at GitVersion.GitPreparer.Prepare() in /_/src/GitVersion.Core/Core/GitPreparer.cs:line 45
at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in /_/src/GitVersion.Core/Core/GitVersionCalculateTool.cs:line 35
at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in /_/src/GitVersion.App/GitVersionExecutor.cs:line 66
INFO [24-09-26 15:37:18:05] Attempting to show the current git graph (please include in issue):
INFO [24-09-26 15:37:18:05] Showing max of 100 commits
INFO [24-09-26 15:37:18:08] ERROR: fatal: not a git repository (or any of the parent directories): .git
6.0.2 on develop with remote repository:
❯ docker run --rm gittools/gitversion:6.0.2 /url https://github.com/xpicio/compute-version.git /b develop
INFO [24-09-26 15:24:55:68] Applicable build agent found: 'LocalBuild'.
INFO [24-09-26 15:24:55:71] Working directory: /tools
INFO [24-09-26 15:24:55:71] Project root is: /tools
INFO [24-09-26 15:24:55:71] DotGit directory is: /tmp/compute-version/.git
INFO [24-09-26 15:24:55:71] Branch from build environment: develop
INFO [24-09-26 15:24:55:71] -< Begin: Creating dynamic repository at '/tmp/compute-version/.git' >-
INFO [24-09-26 15:24:55:72] -< Begin: Cloning repository from url 'https://github.com/xpicio/compute-version.git' >-
INFO [24-09-26 15:24:56:07] Returned path after repository clone: /tmp/compute-version/.git/
INFO [24-09-26 15:24:56:07] -< End: Cloning repository from url 'https://github.com/xpicio/compute-version.git' (Took: 355.67ms) >-
INFO [24-09-26 15:24:56:07] -< End: Creating dynamic repository at '/tmp/compute-version/.git' (Took: 357.94ms) >-
INFO [24-09-26 15:24:56:07] -< Begin: Normalizing git directory for branch 'develop' >-
INFO [24-09-26 15:24:56:08] -< End: Normalizing git directory for branch 'develop' (Took: 3.53ms) >-
ERROR [24-09-26 15:24:56:09] An unexpected error occurred:
System.ArgumentNullException: Value cannot be null. (Parameter 'path')
at LibGit2Sharp.Core.Ensure.ArgumentNotNull(Object argumentValue, String argumentName) in /_/LibGit2Sharp/Core/Ensure.cs:line 24
at LibGit2Sharp.Core.Ensure.ArgumentNotNullOrEmptyString(String argumentValue, String argumentName) in /_/LibGit2Sharp/Core/Ensure.cs:line 50
at LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options, RepositoryRequiredParameter requiredParameter) in /_/LibGit2Sharp/Repository.cs:line 149
at LibGit2Sharp.Repository..ctor(String path) in /_/LibGit2Sharp/Repository.cs:line 70
at GitVersion.Git.GitRepository.<>c__DisplayClass23_0.<DiscoverRepository>b__0() in /_/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs:line 37
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at GitVersion.Git.GitRepository.get_RepositoryInstance() in /_/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs:line 15
at GitVersion.Git.GitRepository.get_Head() in /_/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs:line 24
at GitVersion.GitPreparer.NormalizeGitDirectory(Boolean noFetch, String currentBranchName, Boolean isDynamicRepository) in /_/src/GitVersion.Core/Core/GitPreparer.cs:line 153
at GitVersion.GitPreparer.NormalizeGitDirectory(String targetBranch, Boolean isDynamicRepository) in /_/src/GitVersion.Core/Core/GitPreparer.cs:line 131
at GitVersion.GitPreparer.PrepareInternal(GitVersionOptions gitVersionOptions) in /_/src/GitVersion.Core/Core/GitPreparer.cs:line 55
at GitVersion.GitPreparer.Prepare() in /_/src/GitVersion.Core/Core/GitPreparer.cs:line 45
at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in /_/src/GitVersion.Core/Core/GitVersionCalculateTool.cs:line 35
at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in /_/src/GitVersion.App/GitVersionExecutor.cs:line 66
INFO [24-09-26 15:24:56:09] Please run `git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes=*` to see the git graph. This can help you troubleshoot any issues.
What is expected?
6.0.0-rc.2 on develop with remote repository -> 0.3.0-alpha.0
I think we will remove the support of dynamic repository in the tool as I think it should be the responsibility of the developer that uses the tool to prepare the git repository for the tool to compute the version.
Just to clarify, will the current issue we're facing be fixed, and are you planning to remove the dynamic repository support in a new major release 7.x.x ? Or will the dynamic repository support remain broken in the 6.x.x releases ?
I think it will be removed in v7 as part of the cli refactoring. If you want to invest some time in debugging it and filling in a PR, that work would be much appreciated and possibly included in the v6
Prerequisites
GitVersion package
GitVersion.Tool
GitVersion version
6.0.1 and 6.0.2
Operating system
macOS
What are you seeing?
Hello, i tried upgrading gitversion 5.12 to 6.0.2 to use this new feature #3453, but there seems to be an issue using the parameters
/url
and/b
. I also tried computing the version locally, and that works fine. The commanddocker run --rm -v $(pwd):/repo gittools/gitversion:6.0.2 /repo
works correctly, but I rely heavily on the remote mode.6.0.1 on develop with remote repository:
6.0.2 on develop with remote repository:
What is expected?
6.0.0-rc.2 on develop with remote repository -> 0.3.0-alpha.0
6.0.0-rc.2 on main with remote repository -> 0.2.4
Steps to Reproduce
Simply run:
docker run --rm gittools/gitversion:6.0.1 /url https://github.com/xpicio/compute-version.git /b develop
docker run --rm gittools/gitversion:6.0.2 /url https://github.com/xpicio/compute-version.git /b develop
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
No response
The text was updated successfully, but these errors were encountered: