Use convention to derive a SemVer product version from a GitFlow based repository
arturcic on 5.3.6
Hoping somebody can point out what I'm doing wrong here...
I'm using ContinuousDeployment mode for this flow
Commit to master and run gitversion, it outputs 1.1.0-ci.0
Create a release branch (release/v1.1) from master and run gitversion, it outputs v1.1.0-beta.0
Tag the HEAD commit of release/v1.1 and run gitversion on the tag, ERROR
It looks like the branch being examined is a detached Head pointing to commit '88e98c4'. Without a proper branch name GitVersion cannot determine the build version.
But, I joined gitter to ask specifically about monorepos.
I have a large monorepo that I would like to try and tackle if possible. I see some mention of using tag prefixes.
Lets say I have the following
SuperSolution\
\SuperLibraryThing (NuGet package)
\AnotherLibraryThing (NuGet package)
\SuperApp (ASP.NET Core web app)
I assume I would potentially have a different GitVersion.yml in each of those folders, and I would perhaps set tag-prefix: superlibrarything for the first GitConfig.yml, tag-prefix: anotherlibrarything, for the second, etc
@PatrickBig you should had the following to your YAML:
variables:
GitVersion.SemVer: ''
GitVersion.AssemblySemVer: ''
GitVersion.MajorMinorPatch: ''
GitVersion.InformationalVersion: ''
steps:
task: gitversion/setup@0
inputs:
versionSpec: '5.x'
displayName: 'GitVersion setup'
task: gitversion/execute@0
displayName: 'GitVersion execute'
task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
projects: '$(project)'
arguments: '/p:Version=$(GitVersion.SemVer)
/p:AssemblyVersion=$(GitVersion.AssemblySemVer)
/p:FileVersion=$(GitVersion.MajorMinorPatch)
/p:InformationalVersion=$(GitVersion.InformationalVersion)
--configuration $(buildConfiguration)'
mode: ContinuousDelivery
continuous-delivery-fallback-tag: ''
branches: {}
ignore:
sha: []
merge-message-formats: {}
0.1.0
on master. Created hotfixes/0.1.1
from master
.
hotfixes/0.1.1
, which GitVersion asserted as 0.1.1-beta.1+71. Perfect.
0.1.1-beta.1
(I'm following the GitFlow example here https://gitversion.net/docs/git-branching-strategies/gitflow-examples#hotfix-branches)
refs/heads/pull/943/merge
is not going to be providing GitVersion with an accurate history to work off of.
id
of the step to gitversion
Hey all, I'm trying to get GitVersion to install on my build server (linux) but having some trouble. Most likely due to my proxy setup at the company I work at.
If I use the GitTools/setup task I get a timeout. Anything else that needs to reach the internet doesn't seem to have any problems. Any advise?
Another route I was trying to do was to just pre-install on the agent. But using
dotnet tool install -g GitVersion.Tool
Didn't seem to help