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

GitVersion ubuntu #944

Closed
eaba opened this issue Jun 16, 2022 · 6 comments
Closed

GitVersion ubuntu #944

eaba opened this issue Jun 16, 2022 · 6 comments

Comments

@eaba
Copy link

eaba commented Jun 16, 2022

Usage Information

GitVersion

Description

14:24:19 [INF] > /home/runner/.dotnet/dotnet/home/runner/.nuget/packages/gitversion.tool/5.10.3/tools/net6.0/any/gitversion.dll /nocache
Warning: Could not inject value for "Build.GitVersion"
14:24:20 [WRN] Could not inject value for Build.GitVersion
Nuke.Common.Tooling.ProcessException: Process 'dotnet' exited with code 1.

/home/runner/.dotnet/dotnet /home/runner/.nuget/packages/gitversion.tool/5.10.3/tools/net6.0/any/gitversion.dll /nocache
@ /home/runner/work/SharpPulsar/SharpPulsar
at Nuke.Common.Tooling.ProcessExtensions.AssertZeroExitCode(IProcess process) in //source/Nuke.Common/Tooling/ProcessExtensions.cs:line 39
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(GitVersionSettings toolSettings) in /
/source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 83
at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(Configure`1 configurator) in //source/Nuke.Common/Tools/GitVersion/GitVersion.Generated.cs:line 121
at Nuke.Common.Tools.GitVersion.GitVersionAttribute.GetValue(MemberInfo member, Object instance) in /
/source/Nuke.Common/Tools/GitVersion/GitVersionAttribute.cs:line 47
at Nuke.Common.ValueInjection.ValueInjectionAttributeBase.TryGetValue(MemberInfo member, Object instance) in /_/source/Nuke.Common/ValueInjection/ValueInjectionAttributeBase.cs:line 25

Reproduction Steps

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('/global.json', '/*.csproj') }}
- name: Run './build.cmd Test'
run: ./build.cmd Test

Expected Behavior

no

Actual Behavior

Target Compile => _ => _
.DependsOn(Restore)
.Executes(() =>
{
var vers = GitVersion.MajorMinorPatch;
DotNetBuild(s => s
.SetProjectFile(Solution)
.SetNoRestore(InvokedTargets.Contains(Restore))
.SetConfiguration(Configuration)
//.SetAssemblyVersion(vers)
.SetFileVersion(vers)
.SetVersion(GitVersion.SemVer));
});

Regression?

No response

Known Workarounds

No response

@eaba eaba added the bug 🪲 label Jun 16, 2022
@matkoch
Copy link
Member

matkoch commented Jun 16, 2022

I don't see an issue here. More likely a configuration issue with GitVersion. Try to get the output of the invocation.

@matkoch matkoch closed this as completed Jun 16, 2022
@eaba
Copy link
Author

eaba commented Jun 24, 2022

  • uses: actions/checkout@v1

10:04:23 [WRN] Configuration files for GitHubActions (run_tests_transaction) have changed.
10:04:23 [WRN] Configuration files for GitHubActions (run_tests) have changed.
10:04:23 [WRN] Configuration files for GitHubActions (run_tests_api) have changed.
10:04:23 [WRN] Configuration files for GitHubActions (run_tests_autocluster) have changed.
10:04:23 [WRN] Configuration files for GitHubActions (run_tests_acks) have changed.
10:04:23 [WRN] Configuration files for GitHubActions (run_tests_tableview) have changed.
10:04:23 [WRN] Configuration files for GitHubActions (run_tests_partitioned) have changed.
10:04:23 [WRN] Configuration files for GitHubActions (build) have changed.
10:04:24 [WRN] Configuration files for GitHubActions (run_tests_multitopic) have changed.
10:04:25 [WRN] Configuration files for GitHubActions (run_tests_eventsource) have changed.
10:04:25 [WRN] Configuration files for GitHubActions (nuget) have changed.

  • uses: actions/checkout@v2
  • uses: actions/checkout@v2
  • uses: actions/checkout@v2
  • uses: actions/checkout@v2
  • uses: actions/checkout@v2
  • uses: actions/checkout@v2

@matkoch
Copy link
Member

matkoch commented Jun 25, 2022

?

@ryanande
Copy link

@eaba did you get this issue resolved?
Experiencing the identical issue w/ gh actions, gitversion 5.10.3.

@eaba
Copy link
Author

eaba commented Jul 31, 2022

Yes.
FetchDepth = 0,

@igiona
Copy link

igiona commented Feb 5, 2023

The very same issue happens on Bitbucket as well.
Luckily, the same clone option is available and solves the issue there as well:

    - step:
        name: Build & Test
        clone:
          depth: full

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

No branches or pull requests

4 participants