Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 15 2020 13:06
    arturcic unlabeled #2095
  • Jun 15 2020 13:05
    arturcic opened #2328
  • Jun 15 2020 08:09
    github-actions[bot] commented #2122
  • Jun 15 2020 08:09
    github-actions[bot] commented #2300
  • Jun 15 2020 08:09
    github-actions[bot] commented #2306
  • Jun 15 2020 08:09
    github-actions[bot] commented #2310
  • Jun 15 2020 08:09
    github-actions[bot] commented #2311
  • Jun 15 2020 08:09
    github-actions[bot] commented #2320
  • Jun 15 2020 08:09
    github-actions[bot] commented #2327
  • Jun 15 2020 07:49
    arturcic milestoned #2095
  • Jun 15 2020 07:49
    arturcic demilestoned #2095
  • Jun 15 2020 07:46

    arturcic on 5.3.6

    (compare)

  • Jun 15 2020 07:27
    arturcic demilestoned #2241
  • Jun 15 2020 07:27
    arturcic unassigned #2241
  • Jun 15 2020 07:27
    arturcic demilestoned #2074
  • Jun 15 2020 07:26
    arturcic milestoned #2327
  • Jun 15 2020 07:25
    arturcic demilestoned #2318
  • Jun 15 2020 07:25
    arturcic milestoned #2122
  • Jun 15 2020 07:25
    arturcic labeled #2122
  • Jun 15 2020 07:23
    arturcic demilestoned #2313
Ben Dean
@b-dean

I can put sha in the ignore list, but the problem is that some of those with the commit messages are also the ones that are tagged

$ git log 2.0.0
commit a3079c986ec4df96eb50c2dcee5a575409e98084
Merge: 3bc4e9a 3ce74dd
Author: Foo Bar <foo@bar.baz>
Date:   Thu May 14 23:10:59 2020 -0400

    Merge branch 'release/2020.5-giant-project'

so if I ignore that sha to avoid that merge commit message, it also ignores the tag

vaishnav-n
@vaishnav-n
Hi, i am using gitversion 5.3.3 in cake. We get the build version details. Version goes till here [Version] INFO [05/20/20 9:24:59:42] Found 8 files
[05:24:59][Version] INFO [05/20/20 9:24:59:61] Done writing
but then version throws an error
Checked the full log, no error messages as well
vaishnav-n
@vaishnav-n
got an error message fiinally
[Version] Exception isCake.Core.CakeException: GitVersion: Process returned an error (exit code 1).
[08:11:36][Version] at Cake.Core.Tooling.Tool1.ProcessExitCode(Int32 exitCode) [08:11:36][Version] at Cake.Core.Tooling.Tool1.Run(TSettings settings, ProcessArgumentBuilder arguments, ProcessSettings processSettings, Action`1 postAction)
[08:11:36][Version] at Cake.Common.Tools.GitVersion.GitVersionRunner.Run(GitVersionSettings settings)
[08:11:36][Version] at VersionAliases.Version(ICakeContext context)
[08:11:36][Version] at Submission#0.Version() in :line 2763
[08:11:36][Version] at Submission#0.<<Initialize>>b0_3() in C:\BuildAgent\work\b6bc28d284e694e\build.cake:line 80
[08:11:36][Version] at Cake.Core.CakeTaskBuilderExtensions.<>c
DisplayClass32_0.<Does>b0(ICakeContext x)
[08:11:36][Version] at Cake.Core.CakeTask.<Execute>d
43.MoveNext()
[08:11:36][Version] --- End of stack trace from previous location where exception was thrown ---
[08:11:36][Version] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[08:11:36][Version] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[08:11:36][Version] at Cake.Core.DefaultExecutionStrategy.<ExecuteAsync>d4.MoveNext()
[08:11:36][Version] --- End of stack trace from previous location where exception was thrown ---
[08:11:36][Version] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[08:11:36][Version] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
[08:11:36][Version] at Cake.Core.CakeEngine.<ExecuteTaskAsync>d
31.MoveNext()
Chris Stylianou
@chris5287

Hi, I've got a question around using GitVersion and NuGet packaging via dotnet pack.

When GitVersion determines BuildMetaData should have a value, this in turn affects the FullSemVerto include it.
Eg: Imaging current version is v1.2.4 and we are on a release branch with no tag yet, if GitVersion calculates BuildMetaData=4when I dotnet pack this will set FullSemVer=1.2.4-beta1+4.

This becomes an issue for NuGet packages, as the .nuspec file's <version> property will use the FullSemVer (ie: 1.2.4-beta1+4) but the filename of the nupkg will be UsefulLib.1.2.4-beta1.nupkg as NuGet with normalise the filename and drop the metadata (https://github.com/NuGet/Home/wiki/SemVer-2.0.0-support#pack).

However now if I do another follow-on build of the same commit thenBuildMetaData=5, FullSemVer=1.2.4-beta1+5 and .nuspec file's <version> property will use the FullSemVer (ie: 1.2.4-beta1+5) . BUT the nupkg filename will conflict with the previous UsefulLib.1.2.4-beta1.nupkg

Has anyone dealt with this issue?

Chris Stylianou
@chris5287
FYI by setting “mode: ContinuousDeployment” this seems to generate Se mVer2 versions that work with NuGet packages.
tomasz_augustyniak
@tony6636

hi everyone, I'm trying to use GitVersion with Nuke Build within a DevOps Pipeline. Do I really need to install the UseGitVersion extension from Marketplace to be able to inject the variables in the code as

[GitVersion] readonly GitVersion GitVersion;

? For now I'm getting the following error:

> C:\Users\VssAdministrator\.nuget\packages\gitversion.commandline\5.3.4\tools\gitversion.exe
##[error]Process 'gitversion.exe' exited with code 1.
Mattias Karlsson
@devlead
Does it work locally? Using same version of GitVersion? How are you calling GitVersion? With which args and in which folder as current directory? Inject variables in the code are you parsing the json or is this a Nuke issue?
vaishnav-n
@vaishnav-n
Hi, when building a package , i am unable to remove the -ci tag from master builds. using gitversion 5.0.1
there is an issue related to this GitTools/GitVersion#999
but its been marked as stale
Riksking
@riksking

Hi.
I noticed one trouble in version 5.3.4.
I have some c# projects on .net Core and .net Standard in one solution.
And I have “Directory.Build.props” in core directory of solution
with content
<Project> <PropertyGroup> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> <UpdateAssemblyInfo>true</UpdateAssemblyInfo> <GenerateDocumentationFile>true</GenerateDocumentationFile> <NoWarn>$(NoWarn);1591</NoWarn> </PropertyGroup> </Project>

But when I build this project, I get this message
Target "UpdateAssemblyInfo" skipped, due to false condition; ($(UpdateAssemblyInfo) == 'true') was evaluated as (false == 'true').
And this
Property reassignment: $(UpdateAssemblyInfo)="false" (previous value: "true") at \.nuget\packages\gitversiontask\5.3.4\build\GitVersionTask.props (22,9)
and the version is "0.0.0.0"

In version 5.0.1 it works fine and write current version of file.

Also, if I insert “<UpdateAssemblyInfo>true</UpdateAssemblyInfo>” into the project itself, version calculation and writing is successful.

vaishnav-n
@vaishnav-n
need help in moving a nuget package from prerelease to stable. building it using teamcity. we upload the package to a teamcity feed , feed only works with a prerelease version
Rodney Littles II
@RLittlesII
I have used GitVersion in the past for Xamarin Mobile. I have not tried it with the MSBuild task. I have a few questions around the support. The documentation states it will look for the AssemblyInfo.cs in the Properties directory. The command-line version does a recursive look. My AssemblyInfo.cs is currently at the root of the netstandard project. How can I verify that the MSBuild GitVersionTask is working correctly?
Simon Novak
@snovak7
I need some guidance with GitVersionTask with GitHub Actions, checkout seems to partially write some metadata (assuming) and I get error message from GitVersionTask stating: Please ensure that the repository is an unshallow clone with git fetch --unshallow.
Simon Novak
@snovak7
Ah found it :)
Rodney Littles II
@RLittlesII
Same. seems the GitVersionTask works fine on the netstandard project. Not just have to figure out to funnel that into the info.plist.
Sean Fausett
@gitfool
@snovak7 for GitHub Actions with actions/checkout@v2 you can now use fetch-depth: 0 to fetch all history needed by GitVersion
DocZoid
@DocZoid
I am encountering the following issue with GitVersion: I use GitFlow and have a release branch release/0.1.1. From that branch, GitVersion tells me to build a 0.1.1-rc.1 which is correct, so after building I tag the commit in the release branch with "0.1.1-rc.1". Now I want to build a release. I merge the release/0.1.1 branch onto master using fast-forward. When i now try to biuld from the master branch, GitVersion does not apply the master versioning (which would result in a version 0.1.1), but instead finds the tag "0.1.1-rc.1" and starts building a release candidate from the master branch. I understand that re-building the same version when a tag ist found is necessary, but that should only apply when the current branch yields the same preReleaseLabel ("rc" in this case). So, if my branch configuration tells me to build a "rc" version, and a tag exists with "-rc." preReleaseLabel, then use the tag. If I'm on master, and the branch configuration tells me to build a release without label, don't use any tags with preReleaseLabels.
TheKaliGuy
@TheKaliGuy
Hello community :)
I've just started to use GitVersion and Azure DevOps. I'm currently using task "- task: UseGitVersion@5" in my Pipeline. Without a configuration file specified or one created, after running the task, I notice it changes the Pipeline build number. I've had a small look through the documentation and searched online, unfortunately, I was unable to find a way to configure the GitVersion tool to not overwrite the build numbers.
Is there a way to do this? I'd appreciate if I could be pointed in the right direction and I apologise in advance for my ignorance.
Thank you :)
Kim J. Nordmo
@AdmiringWorm
@TheKaliGuy when you say it changes the Pipeline build number, to you mean the number displayed on the website (sorry if it is a stupid question, I am not really familiar with Azure).
But if that is the case, you can add the following arguments when calling gitversion to prevent that: -output json (by default I think gitversion runs with -output buildserver when running on azure).
TheKaliGuy
@TheKaliGuy
@AdmiringWorm Yes, that's right, the number displayed on the website :)
Specifying additionalArgumentswith the value of -output json doesn't seem to change it for me.
Was that on the documentation page? I'm asking because I've missed some things, it seems =D
jameswoodley
@jameswoodley
Hello. Just a quick check, what with the movement around language at the moment, and GitHub stating they will change master for an alternative (https://www.zdnet.com/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/) will/does GitVersion have a setting to define the new mainline branch? If master doesn't exist, can we set it to work with main or trunk for example?
Gary Ewan Park
@gep13
@jameswoodley you can already define the branch names that you want to use with GitVersion in its yaml configuration file
Have a look here:
As an example.
That repository already has a main branch, rather than a master branch.
jameswoodley
@jameswoodley
Okay cool that's good to know thanks.
Tanner Watson
@tannerwatson
Question: Does GitVersion support monorepos where more than one versioned component is in the same repo? If it does I would assume there would need to be a separate config file per directory tree, with a different tagging pattern per individually versioned component
Gary Ewan Park
@gep13
@tannerwatson no, it doesn’t. It only generates a single version number per repo, based on git history.
Tanner Watson
@tannerwatson
@gep13 I sort of figured that but wanted to double check. Thank you much :)
Gary Ewan Park
@gep13
👍
Lazaro
@LazaroOnline
Hi, I was wondering as a developer of NuGet packages, how can GitVersion.Task tap into the msbuild execution without requiring anything else other than the NuGet being added to a project, can someone help me find how it is done?
Alexander Trauzzi
@atrauzzi
Hey everyone! Quick question... I'm configuring my builds and I noticed that every time I commit to master, it increments my major version, rather than patch.
Alexander Trauzzi
@atrauzzi
Is there any way to configure master so that normal commit activity only increments patch?
2 replies
Angela Kim
@angelakim
My GitVersion config is currently set to GitHubFlow using Continuous Delivery with master incrementing on minor instead of the default of patch. I also have assembly-file-versioning-scheme set to MajorMinorPatchTag. When the build validation runs on my pull-request the file version assigned to my *.dll includes the commit number as the tag. However when the pull-request completes and the build on master branch, the tag is returned to 0. How do I make this number unique?
Angela Kim
@angelakim
I'm trying to get to version 1.0.0. I was on 0.1.0 and added +semver: major to my commit but nothing changed. Then in the GitVersion.yml file I set next-version: 1.0.0 and now I'm at version 2.0.0. Can any one help?
Nicolai Brogaard
@nmbro
does GitVersion not support travis?
Gary Ewan Park
@gep13
can you elaborate on what you mean here?
Nicolai Brogaard
@nmbro
yeah let me see if I can set up a reproducible result on a non-private repository
but it's being cloned with git: depth: false on travis
$ git clone  https://github.com/owner/repo.git owner/repo
Cloning into 'owner/repo'...
$ cd owner/repo
$ git fetch origin +refs/pull/33/merge:
From https://github.com/owner/repo
 * branch            refs/pull/33/merge -> FETCH_HEAD
$ git checkout -qf FETCH_HEAD
and gitversion doesn't seem to be able to originating branch: It looks like the branch being examined is a detached Head pointing to commit '4786479'. Without a proper branch name GitVersion cannot determine the build version.
Nicolai Brogaard
@nmbro
and I'm using the docker image: gittools/gitversion:5.3.5-linux-alpine.3.10-x64-netcoreapp3.1
Gary Ewan Park
@gep13
@nmbro this is more a question for @asbjornu or @arturcic but what i will say is that in order to function, GitVersion needs the entire history of the repository. Have you tried running with -output buildserver rather than -output json?