-
Notifications
You must be signed in to change notification settings - Fork 662
Closed
Description
I have installed the GitVersion build task on a TFS 2018 R2 instance then ran it against a repo that contains a GitVersion.yml in the repo root.
mode: ContinuousDeployment
branches:
master:
tag: beta
hotfix:
tag: useBranchName
The task config (exported) looks like this:
{
"displayName": "GitVersion",
"alwaysRun": false,
"continueOnError": false,
"condition": "succeeded()",
"enabled": true,
"timeoutInMinutes": 0,
"inputs": {
"runtime": "core",
"preferBundledVersion": "true",
"configFilePath": "",
"updateAssemblyInfo": "false",
"updateAssemblyInfoFilename": "",
"gitVersionPath": "",
"targetPath": "",
"additionalArguments": ""
},
"task": {
"id": "e5383830-3f75-11e5-82ed-81492570a08e",
"versionSpec": "5.*",
"definitionType": "task"
}
},
Running the task without the config path set will generate the wrong pre-release tags. The master branch would not contain a prerelease tag, hotfix would use beta which is the default OOTB config.
Seems like the default loading of GitVersion.yml isn't happening. The code for the task looks fine so I'm assuming it is an issue with the GitVersionCore logic.
The workaround is to specifically set the config path property on the task to GitVersion.yml. The build now picks up the config and assigns the correct prerelease tags. For example:
{
"displayName": "GitVersion",
"alwaysRun": false,
"continueOnError": false,
"condition": "succeeded()",
"enabled": true,
"timeoutInMinutes": 0,
"inputs": {
"runtime": "core",
"preferBundledVersion": "true",
"configFilePath": "GitVersion.yml",
"updateAssemblyInfo": "false",
"updateAssemblyInfoFilename": "",
"gitVersionPath": "",
"targetPath": "",
"additionalArguments": ""
},
"task": {
"id": "e5383830-3f75-11e5-82ed-81492570a08e",
"versionSpec": "5.*",
"definitionType": "task"
}
},
Metadata
Metadata
Assignees
Labels
No labels