Closed
Description
Hi,
The Devops GitVersion task does not give the same version as command line getversion for prereleases (1.4.7+1 instead of 1.4.7-ci0001).
YML:
# Fiveforty Web Application Framework
trigger:
- develop
- master
- release/*
- hotfix/*
pool:
name: 'fiveforty'
variables:
solution: './framework.net/framework.net.sln'
buildPlatform: 'Any CPU'
Builder: 'AzureDevops'
AdditionalNugetSources: 'https://www.myget.org/F/orchardcore-preview/api/v3/index.json'
WebpackCommand: '../node_modules/.bin/webpack --config ./webpack.config.ts'
steps:
- checkout: self
clean: true
persistCredentials: true
submodules: recursive
- task: GitVersion@5
inputs:
runtime: 'core'
updateAssemblyInfo: true
updateAssemblyInfoFilename: 'Framework.Net/src/**/AssemblyInfo.cs'
- script: echo %Action%%BuildVersion%
displayName: 'Set build version'
env:
Action: '##vso[build.updatebuildnumber]'
BuildVersion: $(GitVersion.FullSemVer)
- script: GitVersion
displayName: 'Get git version'
With command line gitversion :
GitVersion Task Log:
INFO [09/10/19 7:51:22:49] Returning Project Root from DotGitDirectory: C:\agent\_work\2\s\.git - C:\agent\_work\2\s
INFO [09/10/19 7:51:22:50] Begin: Loading version variables from disk cache
INFO [09/10/19 7:51:22:50] Cache file C:\agent\_work\2\s\.git\gitversion_cache\00A31D7FC7DC81330434527CF3A6B7AABFBB2969.yml not found.
INFO [09/10/19 7:51:22:50] End: Loading version variables from disk cache (Took: 0.39ms)
INFO [09/10/19 7:51:22:50] IsDynamicGitRepository: False
INFO [09/10/19 7:51:22:50] Returning Project Root from DotGitDirectory: C:\agent\_work\2\s\.git - C:\agent\_work\2\s
INFO [09/10/19 7:51:22:51] Using latest commit on specified branch
INFO [09/10/19 7:51:22:53] Running against branch: master (55a148b0f78c80a573c22dfceeb930f72de1d28f)
INFO [09/10/19 7:51:22:54] Begin: Calculating base versions
INFO [09/10/19 7:51:22:72] Fallback base version: 0.1.0 with commit count source bc26d68b36380e5d1e3ce190820df3fd0d8844fe (Incremented: None)
INFO [09/10/19 7:51:22:85] Git tag 'v1.4.6': 1.4.6 with commit count source 75467b353c670c2669776e3f81421e9bcb25d200 (Incremented: 1.4.7)
INFO [09/10/19 7:51:22:86] Git tag 'v1.4.5': 1.4.5 with commit count source d69c2eb00a7e5121266560898db201b54dd16eda (Incremented: 1.4.6)
INFO [09/10/19 7:51:22:87] Git tag 'v1.4.3': 1.4.3 with commit count source dadb978a9c9de2f2669d9b5202ae92e05628fba6 (Incremented: 1.4.4)
INFO [09/10/19 7:51:22:88] Git tag 'v1.4.4': 1.4.4 with commit count source dadb978a9c9de2f2669d9b5202ae92e05628fba6 (Incremented: 1.4.5)
INFO [09/10/19 7:51:22:89] Git tag 'v1.4.2': 1.4.2 with commit count source 2013f7bdec51db75033dc6a557972835401e1882 (Incremented: 1.4.3)
INFO [09/10/19 7:51:22:90] Git tag 'v1.3.11': 1.3.11 with commit count source d2e128e9cc1ee679039d4b540f68b0846d0725f4 (Incremented: 1.3.12)
INFO [09/10/19 7:51:22:91] Git tag 'v1.4.0': 1.4.0 with commit count source d2e128e9cc1ee679039d4b540f68b0846d0725f4 (Incremented: 1.4.1)
INFO [09/10/19 7:51:22:92] Git tag 'v1.3.9': 1.3.9 with commit count source 0e64542a0459e146a78fadff8b29c64bfccc844a (Incremented: 1.3.10)
INFO [09/10/19 7:51:22:93] Git tag 'v1.3.7': 1.3.7 with commit count source 4bb92e363628b95b79b96e918e6f36444a46ce4f (Incremented: 1.3.8)
INFO [09/10/19 7:51:22:95] Git tag 'v1.3.6': 1.3.6 with commit count source bf9bb18612995081537c01582a0177d5a136a74e (Incremented: 1.3.7)
INFO [09/10/19 7:51:22:98] Git tag 'v1.3.4': 1.3.4 with commit count source 59691604ff24403c3308949cff68a7676f8ad860 (Incremented: 1.3.5)
INFO [09/10/19 7:51:23:01] Git tag 'v1.3.5': 1.3.5 with commit count source 59691604ff24403c3308949cff68a7676f8ad860 (Incremented: 1.3.6)
INFO [09/10/19 7:51:23:04] Git tag 'v1.3.3': 1.3.3 with commit count source 9fee563b1d0768d20213e0d5a81bdd36cad7db6c (Incremented: 1.3.4)
INFO [09/10/19 7:51:23:06] Git tag '1.2.1+1': 1.2.1+1 with commit count source 133e071a40708d17cd349d5fdc71462185095987 (Incremented: 1.2.2)
INFO [09/10/19 7:51:23:09] Git tag '1.2.0+28': 1.2.0+28 with commit count source 05c06ddfb8b421d01e62d60d7eccffa88984a984 (Incremented: 1.2.1)
INFO [09/10/19 7:51:23:12] Git tag 'v1.1.0.0': 1.1.0+0 with commit count source b2ed7a20eb264e40616066dd03c5619e113f83d1 (Incremented: 1.1.1)
INFO [09/10/19 7:51:23:19] Found commit [55a148b0f78c80a573c22dfceeb930f72de1d28f] matching merge message format: Default
INFO [09/10/19 7:51:23:19] Found commit [55a148b0f78c80a573c22dfceeb930f72de1d28f] matching merge message format: Default
INFO [09/10/19 7:51:23:20] Merge message 'Merge branch 'release/1.3.2'': 1.3.2 with commit count source 1faccb10356fb6fa3d00e5d47f27b3c53698810d (Incremented: None)
INFO [09/10/19 7:51:23:21] Merge message 'Merge branch 'release/1.3.1' of https://fiveforty.visualstudio.com/Framework.Net/_git/Framework.Net into release/1.3.1': 1.3.1 with commit count source 87715a7db49ae4b791c9a1c215fd0e65804d79b6 (Incremented: None)
INFO [09/10/19 7:51:23:23] Found multiple base versions which will produce the same SemVer (1.4.7), taking oldest source for commit counting (Git tag 'v1.4.6')
INFO [09/10/19 7:51:23:24] Base version used: Git tag 'v1.4.6': 1.4.6 with commit count source 75467b353c670c2669776e3f81421e9bcb25d200 (Incremented: 1.4.7)
INFO [09/10/19 7:51:23:24] End: Calculating base versions (Took: 700.53ms)
INFO [09/10/19 7:51:23:24] 1 commits found between 75467b353c670c2669776e3f81421e9bcb25d200 and 55a148b0f78c80a573c22dfceeb930f72de1d28f
INFO [09/10/19 7:51:23:28] Begin: Creating dictionary
INFO [09/10/19 7:51:23:28] End: Creating dictionary (Took: 4.88ms)
INFO [09/10/19 7:51:23:31] Begin: Storing version variables to cache file C:\agent\_work\2\s\.git\gitversion_cache\00A31D7FC7DC81330434527CF3A6B7AABFBB2969.yml
INFO [09/10/19 7:51:23:42] End: Storing version variables to cache file C:\agent\_work\2\s\.git\gitversion_cache\00A31D7FC7DC81330434527CF3A6B7AABFBB2969.yml (Took: 108.96ms)
INFO [09/10/19 7:51:23:42] Applicable build agent found: 'VsoAgent'.
Executing GenerateSetVersionMessage for 'VsoAgent'.
Executing GenerateBuildLogOutput for 'VsoAgent'.
INFO [09/10/19 7:51:23:43] Updating assembly info files
INFO [09/10/19 7:51:23:43] Found 0 files
Async Command Start: Update Build Number
Update build number to 1.4.7+1 for build 741
Async Command End: Update Build Number
Finishing: GitVersion