NuKeeperDotNet / NuKeeper-AzureDevops-extension

NuKeeper AzureDevops and VSTS extension
12 stars 15 forks source link

Cannot find current head branch for repo #29

Closed OneCyrus closed 5 years ago

OneCyrus commented 5 years ago

once again broken with the latest changes.

##[section]Starting: NuKeeper
==============================================================================
Task         : NuKeeper
Description  : Version 0.2.7
Version      : 0.2.7
Author       : NuKeeper
Help         : For help please visit https://github.com/NuKeeperDotNet/NuKeeper
==============================================================================
Downloading: https://www.nuget.org/api/v2/package/NuKeeper
Extracting archive
[command]C:\WINDOWS\system32\chcp.com 65001
Active code page: 65001
[command]C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\VstsBuildAgent02\_work\_temp\nukeeper.nupkg', 'D:\VstsBuildAgent02\_work\_temp\nukeeper')"
[command]D:\VstsBuildAgent02\externals\git\cmd\git.exe config --global user.name NuKeeper
[command]D:\VstsBuildAgent02\externals\git\cmd\git.exe config --global user.email nukeeper@nukeeper.com
[command]"C:\Program Files\dotnet\dotnet.exe" D:\VstsBuildAgent02\_work\_temp\nukeeper\tools\netcoreapp2.1\any\NuKeeper.dll repo D:\VstsBuildAgent02\_work\28\s *** --targetBranch master -m 3

Unhandled Exception: NuKeeper.Abstractions.NuKeeperException: Cannot find current head branch for repo at 'D:/VstsBuildAgent02/_work/28/s/.git/', with 6 branches
   at NuKeeper.Git.LibGit2SharpDiscoveryDriver.GetCurrentHead(Uri repositoryUri) in /home/vsts/work/r1/a/drop/NuKeeper.Git/LibGit2SharpDiscoveryDriver.cs:line 75
   at NuKeeper.AzureDevOps.VstsSettingsReader.CreateSettingsFromLocal(Uri repositoryUri) in /home/vsts/work/r1/a/drop/NuKeeper.AzureDevOps/VSTSSettingsReader.cs:line 98
   at NuKeeper.AzureDevOps.VstsSettingsReader.RepositorySettings(Uri repositoryUri, String targetBranch) in /home/vsts/work/r1/a/drop/NuKeeper.AzureDevOps/VSTSSettingsReader.cs:line 47
   at NuKeeper.Commands.RepositoryCommand.PopulateSettings(SettingsContainer settings) in /home/vsts/work/r1/a/drop/NuKeeper/Commands/RepositoryCommand.cs:line 49
   at NuKeeper.Commands.CommandBase.OnExecute() in /home/vsts/work/r1/a/drop/NuKeeper/Commands/CommandBase.cs:line 88
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass138_0.<OnExecute>b__0()
   at NuKeeper.Program.Main(String[] args) in /home/vsts/work/r1/a/drop/NuKeeper/Program.cs:line 33
##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 3762504530
##[section]Finishing: NuKeeper
MarcBruins commented 5 years ago

Should be fixed with the new release of NuKeeper

MarcBruins commented 5 years ago

I've been thinking about a reliable way to test changes as I cannot do that right now. I'm going to make an extra test extension and use that first, once that is stable I'll update the real extension. Hopefully that will work out better then this mess

OneCyrus commented 5 years ago

0.3.2 has the same issue

yeah, some prerelease version with automated testing would come a long way. as far as i know you can release private releases (previews) in the marketplace.

MarcBruins commented 5 years ago

Alright, it is fixed again. It now also stays in detached head mode like azure devops intents. This also might make the git fetch obsolote?

Next i'll look into how to make this progress a bit more mature. I don't see any private previews in the marketplace portal.. Thanks for having patience and reporting it everytime!