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
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?
Nicolai Brogaard
@nmbro
nope but I can give it a shot
Nicolai Brogaard
@nmbro
same story - but environment variables are not exposed to docker container - but I which ones would gitversion actually need?
Kim J. Nordmo
@AdmiringWorm

@nmbro I took a quick look at the config that travis-ci reports to use: https://travis-ci.com/github/nmbro/travis-gitversion/jobs/356052758/config

and from the looks of it, it seems it doesn't respect that you use git: depth: false (I don't know if this is something related to using travis-ci.com, as for my own repository on travis-ci.org it respects it), and from looking at the build output from that build it indeed uses a depth flag of 50: https://travis-ci.com/github/nmbro/travis-gitversion/jobs/356052758#L113

Try adding to your yaml file a call to git fetch --unshallow, I believe this should then get gitversion to work for you (since the build didn't respect the git depth value).

I tried that on this commit which also failed
Kim J. Nordmo
@AdmiringWorm

@nmbro adding that in a PR don't help, travis (same with appveyor) don't use the yaml file from the pull request, but from the target branch.
So it would need to be added in the repository directly.

You can see the config used on that build here: https://travis-ci.com/github/nmbro/travis-gitversion/jobs/356052758/config

Nicolai Brogaard
@nmbro
updated master branch, and now I'm getting
$ git fetch --unshallow
fatal: --unshallow on a complete repository does not make sense
Kim J. Nordmo
@AdmiringWorm
sounds like it suddenly decided to honor the git depth flag then, honestly I am stumped and got no other suggestions at the moment.
Seems you would need to wait until you hear back from @arturcic or @asbjornu instead.....
I know gitversion works on travis-ci.org, but I have never tried it on travis-ci.com (but in my mind, there shouldn't really be any difference).
Nicolai Brogaard
@nmbro
I don't think there's a difference between travis-ci.com and travis-ci.org anymore - but it used to be the difference between public and private repos
Alexander Trauzzi
@atrauzzi

Hey again everyone, more detail on my problem from a few days ago:

mode: Mainline
increment: Patch
branches:
  develop:
    mode: ContinuousDeployment

When I'm running the above configuration, when I go to generate a version off of master following a merge of develop into it, I get the following error: Mainline development mode doesn't yet support pre-release tags on master

What's weird is that I've never tagged master with any pre-release tags. Only my develop commits have been the target of pre-release tags... I basically want pre-release behaviour on my develop branch, but any time I merge to master, I want it to cause a minor version increment.

Werner Kapferer
@woernsn
Hey everybody :)
I seem to have problem running gitversion.exe with mono on Debian (Sid).
Am I missing something or is it currently not working for anybody else?
GitVersion 5.3.4.0
Mono JIT compiler version 6.10.0.104
Kim J. Nordmo
@AdmiringWorm
@woernsn You can't run GitVersion.exe with mono.
You will either need to downgrade the version to 5.0.1, or use the .NET Core tool of gitversion instead (I recommend this aproach).
Werner Kapferer
@woernsn
Thanks @AdmiringWorm !
Maybe you should state that in https://gitversion.net/docs/ too.
Might help other (also) lost persons :D.
I will take a look at the .NET Core tool.
Tim Long
@NameOfTheDragon

Is anyone using GitVersionTask in a GitHub workflow action? I've just tried to set it up and got a rather confusing error message:

GitVersionTask.targets(46,9): error : GitVersionException: Cannot find commit 2108544aed45614f96f35440d4fadfa70773b8e0. Please ensure that the repository is an unshallow clone with git fetch --unshallow
eek! What do I do?

5 replies
Daniel Valadas
@valadas
I am confused, I have many branches and everything works as expected without a config, now say I create a release/4.0.0 branch I do get v4.0.0, then when I merge that to master it gets either v3.2.1 or v4.0.1 no matter what kind of config I try. According to my understanding I was expected that merge to produce the verison specified in the release branch when merging it to master ?
2 replies
Josef Trejbal
@PepekT
Hello :)
I would like to ask how to properly increment version in release branch? Lets say I have version 0.1.0-beta1 , then i found issue, fixed it and i would like to increment to beta-2.. How this should be done? Version is not incrementing per commit (I suppose its because default mode for release branch is ContinuousDelivery).. So correct way is use tag? Thank you