## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### 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

• 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
quasarea
@quasarea
Hi, I wonder - is there a way to automagically increment with +semver: minor when pr from feature branch gets merged?
I guess, perhaps pipeline when building feature pr would have to update commit on it to include +semver: minor
greengumby
@greengumby
Is there a way I can customise the version string generated on a feature branch. Essentially I run multiple feature branches in parallel and the "guessing" of the version is causing confusion for developers and testers. So instead of 1.0.1-foo.1+1 it becomes foo.1+1 .
Gaute Løken
@gautelo
Is there a way to prevent GitVersion from using remote branches? I want to go back in time and run GitVersion with a newer version and changed config, but I'm finding that having my repo connected to a remote is messing with my results. I can remove the remote, but that makes it cumbersome to navigate back and forth in the history..
samirem
@samirem
Hi! I have a problem where GitVersion.CommandLine is bumping my major version. Latest tags are 1.2.8 and GitVersion automatically sets next version to 2.0.0 instead of 1.2.9. Any ideas how to prevent this?
samirem
@samirem
I solved this by ignoring a commit that has +semver:major way back in the history.
mcoolidge
@mcoolidge
Is GitVersionTask actually depreciated? I only see that reference in the nuget page, but all the docs still reference it. Replacing with GitVersion.MsBuild doesn't seem to work out of the box.
srollinet
@srollinet
Hi, everyone! Is it possible to configure GitVersion to allow a number in the PreReleaseLabel? I have tags like v1.0.0-SAT1 and the generated version number is 1.0.0-SAT.1 which become a 1.0.0-SAT.2 after a commit. So I have version collisions when I create a second 'SAT' tag.
What I want to achieve is something like that
tag v1.0.0-SAT1 -> 1.0.0-SAT1
comit -> 1.0.0-SAT1.1
tag v1.0.0-SAT2 -> 1.0.0-SAT2
Andrej Zachar
@azachar
Hello Everyone, how come that develop branch produced version 0.2.0.xxx and master branch of the same commit produces 0.1.12 (the common tag is 0.1.11)
I am not using this GitVersion.yml:
branches:
master: {}
release:
tag: 'rc'
feature:
tag: 'dev'
develop:
tag: 'a'
hotfix:
tag: 'post'
Is it because the master is {}?
Gaute Løken
@gautelo
Does gitversion apply some default where your own GitVersion.yml is applied on top of those defaults? I'm getting a "Multiple branch configurations match the current branch branchName of {0}" error because it's confused between my 'task' config and a 'main' config. But I don't have any 'main'. (We're still using 'master'.) I suspect this is because of some defaults including a 'main'. Where can I find these defaults? And even better, how can I disable 'main'?
Gaute Løken
@gautelo
Seems my first question is answered by gitversion /showConfig. My second question seems to then be that config section for 'master' is simply renamed to 'main'. Ok then.
And my mistake was that the regex for master was 'master' instead of '^master$' which meant a task branch which contained the word master messed me up. Arright.. Thanks for letting me rubber duck this one out! ;) Neil Stevens @StickNitro Hallo, can anyone help with a configuration question please, I have a gitversion.yml using mainline mode, we develop in branches taken from master and merge back into master through PRs (we don't use gitflow), I have a problem where if I create a branch I can see the version getting incremented in the branch but when I merge the branch back to master it does not carry through (e.g. master is at 0.1.0, my branch feature/one is at 0.2.0 so when I merge I would expect master to be 0.2.0 but it ends up being 0.1.1) this is my config mode: Mainline branches: master: is-mainline: true feature: regex: feature?[/-] increment: Minor ignore: sha: [] merge-message-formats: {} Justin Grote @JustinGrote @StickNitro Hey, this is because the increment statement on feature is the default increment, e.g. if you don't specify a commit message. When you merge to master that's no longer applied, and since I'm guessing your commit names aren't following the conventions to tell gitversion to bump the version, you end up with a patch increment rather than a minor one. Try adding to at least one of your commits in your feature branch +semver:minor, then when you merge you should get 0.2.0. Justin Grote @JustinGrote Q: In Github Actions my github version for pull requests doesn't seem to be matching. It keeps coming back as pull/1/merge rather than PullRequest.x. If I make a local pull/1/merge branch though it works fine. Is there something I'm missing about Github Actions? Justin Grote @JustinGrote hmm the GitTools github actions works as expected, wondering what's messed up in my config I'm an idiot, I had /nonormalize set. Hope this helps someone else. Justin Grote @JustinGrote Is there any way in GitVersion to get a list of commits it evaluated since the last tag and find out how it classified them? (Major/Minor/Patch)? I'm working on a changelog generator and I'd like it to use GitVersion's evaluation Gary Ewan Park @gep13 @JustinGrote you should be able to use gitversion /diag to get that information NeilMacMullen @NeilMacMullen Anybody know if DisableGitVersionTask has been deprecated/replaced? I've just upgraded from gitversiontask to gitversion.msbuild and despite having DisableGitVersionTask set true, gitversion.exe is trying to run under Ncrunch NeilMacMullen @NeilMacMullen Justin Grote @JustinGrote @gep13 that's what I thought but it's not in there, it's just a summar summary I ended up having my script pull the regexes out of the gitversion config and do a rev-list and log to basically calculate the same thing. It's not ideal but haven't had any times when it has mismatched so far Gary Ewan Park @gep13 @JustinGrote what version of GitVersion are you using? Can you show the output that you are seeing from running that command? Matthias Koch @matkoch Website has 404's all over the place (e.g., https://gitversion.net/docs/more-info/incrementing-per-commit) Gary Ewan Park @gep13 Where is that page linked from? Matthias Koch @matkoch google this one works, but any other link is broken... i noticed there's a new website, but probably you're missing a couple of redirects Thomas Skardal @tskardal I have some issues with builds getting a wrong version number. These are builds done by appveyor, and gitversion.yml contains: assembly-versioning-scheme: MajorMinorPatchTag mode: ContinuousDelivery branches: {} ignore: sha: [] commits-before: 2019-04-01T09:00:00 When the latest tag (tagged on master) is built though, it somehow decides to increment, and we end up with a bumped minor version. If I checkout the tag locally and run gitversion (on macos, appveyor build is windows) it works fine. I'm not sure how to attack this. FWIW: the appveyor image contains this version 5.1.3+Branch.master.Sha.bef8ebc0b62b3ddd0cdafe09b66d68bbfcaf90d5 1 reply Peder Husom @hayer Using GitVersion via Github actions. I can see that it outputs the version information, but the steps.<step id>.outputs.nuGetVersionV2 seems to always be empty (same goes for the other variables). Id is set, steps are inside the same job, using gittools/actions/gitversion/execute@v0.9.9.. Any pointers to what im doing wrong?  steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Install GitVersion uses: gittools/actions/gitversion/setup@v0.9.9 with: versionSpec: '5.x' - name: Determine Version id: gv uses: gittools/actions/gitversion/execute@v0.9.9 with: useConfigFile: true additionalArguments: '/showConfig' - name: Display GitVersion outputs # .... prints all the steps.gv.semVer etc -- which are all empty.. Using echo "BuildMetaData:${{ steps.gv.outputs.buildMetaData }}" to print the values. Tried without the spaces after {{ and before }} as well.

Kim J. Nordmo
@hayer did you try without the additionalArguments argument?
Just a thought, maybe it prevents the outputs being set
Abhishek Tripathi
@AbhishekTripathi
I am trying to use gitversion in my CI/CD process. Looking at the documentation, it appears the only version for dotnet core binaries is dotnet-gitversion. Since the sdk style projects do not contain any AssemblyInfo.cs files, is there a command line switch to update the project file and have the version incremented there? Possibly someone can point me to some link. I can't use build server variable approach at the moment using /output switch.
Abhishek Tripathi
@AbhishekTripathi
dotnet-gitversion.exe /updateassemblyinfo doesn't work with dotnet core projects because there is no AssemblyInfo.cs and adding the file specifically for gitversion is not good because people may forget to do it for new projects.
Gaute Løken
@gautelo
I don't understand the repository structure. Could somebody please give me some directions either here or some docs explaining how to build and run tests? Basically I am missing something when it comes to repositories that aren't a simple open vs solution and build. There are scripts and things and I don't know what to run or where to look.
Gaute Løken
@gautelo
Ok. So I see it's using something called Cake. I guess that means I need to learn that tool to be able to do things.. barrier to entry.. :(
Gary Ewan Park
@gep13

@gautelo the build process should be as simple as running the ./build.ps1 file in the root of the repository. Are you saying that this isn't working?

This is the process that is currently executed on the AppVeyor CI for the project.

Gaute Løken
@gautelo
The first thing it says if I run that is that it's supposed to be run in the CI scenario, and not for local dev
If I disregard that and run it anyway I'm getting some file-access error.
@gep13 I also have to set the execution policy
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Gaute Løken
@gautelo
ohh.. when I right-click my console it outputs a lot of more Access to the path (in .git folder) kind of errors such as this:
Error: One or more errors occurred. (Access to the path 'C:\Dev\ref\GitVersion\src\GitVersion.App.Tests\bin\Release\netcoreapp3.1\TestRepositories\076332c9-80cc-4247-8392-de22ccf6981c\.git\objects\09\ce06bf80bebdb9f95ea70d37b91f8a5a83c307' is denied.)

Access : The term 'Access' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:38
+ Error: One or more errors occurred. (Access to the path 'C:\Dev\ref\G ...
+                                      ~~~~~~
+ CategoryInfo          : ObjectNotFound: (Access:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Gary Ewan Park
@gep13
I have just tried the same ./build.ps1 file on my machine here, and the Cake build runs as expected on my machine, so I don't have a good answer as to why you are getting permission errors when you try to run the build. :-(
Are you also getting errors when trying to run the build in Visual Studio?