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

Update to GitVersion 2.5.x does not work #68

Closed
koppor opened this issue Mar 21, 2020 · 7 comments
Closed

Update to GitVersion 2.5.x does not work #68

koppor opened this issue Mar 21, 2020 · 7 comments

Comments

@koppor
Copy link
Contributor

koppor commented Mar 21, 2020

I am not sure whether to report here or to https://github.com/GitTools/GitVersion.

I try updating GitVersion to 2.5.0 (and 2.5.4; see JabRef/jabref#6147).

After updating, I get that json != json:

Unhandled exception. GitVersion.Exceptions.WarningException: Value 'json' cannot be parsed as output type, please use 'json' or 'buildserver'

My config is not too complex:

assembly-versioning-format: '{major}.{minor}.{WeightedPreReleaseNumber}'
assembly-informational-format: '{major}.{minor}{PreReleaseTagWithDash}--{CommitDate}--{ShortSha}'
mode: ContinuousDeployment

branches:
  master:
    regex: ^master
    tag: ''
    pre-release-weight: 0

Google did not find the exception, so I think, it's a local issue somehow?

Unhandled exception. GitVersion.Exceptions.WarningException: Value 'json' cannot be parsed as output type, please use 'json' or 'buildserver'
   at GitVersion.ArgumentParser.ParseArguments(String[] commandLineArguments) in D:\a\GitVersion\GitVersion\src\GitVersionExe\ArgumentParser.cs:line 320
   at GitVersion.Program.<>c__DisplayClass1_0.<CreateHostBuilder>b__2(IServiceProvider sp) in D:\a\GitVersion\GitVersion\src\GitVersionExe\Program.cs:line 28
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
...
    at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at GitVersion.Program.Main(String[] args) in D:\a\GitVersion\GitVersion\src\GitVersionExe\Program.cs:line 14
   at GitVersion.Program.<Main>(String[] args)
(node:2823) UnhandledPromiseRejectionWarning: TypeError: (e || "").replace is not a function
    at /home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:5:943
    at s.toString (/home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:5:1005)
    at o (/home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:5:372)
    at Object.t.issue (/home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:5:432)
    at c (/home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:9:741)
    at Object.t.setFailed (/home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:9:1482)
    at h.setFailed (/home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:304:1902)
    at Object.<anonymous> (/home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:332:1542)
    at Generator.throw (<anonymous>)
    at a (/home/runner/work/_actions/gittools/actions/v0.9/dist/github/gitversion/execute/bundle.js:332:221)
(node:2823) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2823) [DEP0018] DeprecationWarn
@asbjornu
Copy link
Member

Which version of gittools/actions/gitversion/setup and gittools/actions/gitversion/execute are you using?

@koppor
Copy link
Contributor Author

koppor commented Apr 2, 2020

First try (2020-03-20)

  • gittools/actions/gitversion/setup@v0.9
  • gittools/actions/gitversion/execute@v0.9
  • versionSpec: '5.2.4'

Second try (2020-03-21)

  • gittools/actions/gitversion/setup@v0.9
  • gittools/actions/gitversion/execute@v0.9
  • versionSpec: '5.2.0'

Triedagain today (2020-04-02)

  • gittools/actions/gitversion/setup@v0.9
  • gittools/actions/gitversion/execute@v0.9
  • versionSpec: '5.2.0'
Run gittools/actions/gitversion/setup@v0.9
  with:
    versionSpec: 5.2.0
    includePrerelease: false
  env:
    SpringerNatureAPIKey: ***

--------------------------
Installing GitVersion.Tool version 5.2.0
--------------------------
Command: dotnet tool install GitVersion.Tool --tool-path /home/runner/work/_temp/f37a6ded-d757-4207-954d-f3b6a6eafc87 --version 5.2.0
/usr/bin/dotnet tool install GitVersion.Tool --tool-path /home/runner/work/_temp/f37a6ded-d757-4207-954d-f3b6a6eafc87 --version 5.2.0

Welcome to .NET Core 3.1!
---------------------
SDK Version: 3.1.201

----------------
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Find out what's new: https://aka.ms/dotnet-whats-new
Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Write your first app: https://aka.ms/first-net-core-app
--------------------------------------------------------------------------------------
You can invoke the tool using the following command: dotnet-gitversion
Tool 'gitversion.tool' (version '5.2.0') was successfully installed.

@arturcic
Copy link
Member

arturcic commented Apr 2, 2020

can you use the latest version 0.9.2? can you also specify in versionSpec 5.2.x?

@koppor
Copy link
Contributor Author

koppor commented Apr 2, 2020

I took the steps out of README.md:

grafik

I thought that v0.9 was an alias for the v0.9.x (what other extensions also do). Fixed (refs #82).

Works now.

@koppor koppor closed this as completed Apr 2, 2020
@arturcic
Copy link
Member

arturcic commented Apr 2, 2020

that's the version tag so it should be explicit

@koppor
Copy link
Contributor Author

koppor commented Apr 2, 2020

I got the idea from the checkout action

grafik

@koppor
Copy link
Contributor Author

koppor commented Apr 2, 2020

OMG, for actions/cache, they fucked it up:

grafik

Refs actions/cache#241

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

3 participants