File tree Expand file tree Collapse file tree 3 files changed +86
-0
lines changed Expand file tree Collapse file tree 3 files changed +86
-0
lines changed Original file line number Diff line number Diff line change
1
+ param (
2
+ [string ] [Parameter (Mandatory = $false )]
3
+ $updateAssemblyInfo ,
4
+ [string ] [Parameter (Mandatory = $false )]
5
+ $additionalArguments
6
+ )
7
+
8
+ Write-Verbose ' Entering Run-GitVersion.ps1'
9
+
10
+ # Import the Task.Common dll that has all the cmdlets we need for Build
11
+ import-module " Microsoft.TeamFoundation.DistributedTask.Task.Common"
12
+
13
+ # Returns a path to GitVersion.exe
14
+ function Get-PathToGitVersionExe () {
15
+ $PSScriptRoot = Split-Path - Parent - Path $MyInvocation.MyCommand.ScriptBlock.File
16
+ $targetPath = Join-Path - Path $PSScriptRoot - ChildPath " GitVersion.exe"
17
+ return $targetPath
18
+ }
19
+
20
+
21
+ # # Execution starts here
22
+
23
+
24
+ $updateAssms = Convert-String $updateAssemblyInfo Boolean
25
+
26
+ # Call GitVersion.exe
27
+ $gvPath = Get-PathToGitVersionExe
28
+ Write-Output " Path to GitVersion.exe = $gvPath "
29
+ Invoke-Tool - Path $gvPath - Arguments " /output buildserver /updateAssemblyInfo $updateAssms $additionalArguments "
30
+
31
+
Original file line number Diff line number Diff line change
1
+ {
2
+ "id" : " e5983830-3f75-11e5-82ed-81492570a08e" ,
3
+ "name" : " GitVersion" ,
4
+ "friendlyName" : " GitVersion Task" ,
5
+ "description" : " Easy Semantic Versioning (http://semver.org) for projects using Git" ,
6
+ "author" : " GitTools and Contributors" ,
7
+ "helpMarkDown" : " See the [documentation](http://gitversion.readthedocs.org/en/latest/) for help" ,
8
+ "category" : " Build" ,
9
+ "visibility" : [
10
+ " Build" ,
11
+ " Release"
12
+ ],
13
+ "demands" : [],
14
+ "version" : {
15
+ "Major" : " 0" ,
16
+ "Minor" : " 1" ,
17
+ "Patch" : " 0"
18
+ },
19
+ "minimumAgentVersion" : " 1.83.0" ,
20
+ "groups" : [
21
+ {
22
+ "name" : " additional" ,
23
+ "displayName" : " Additional Options"
24
+ "isExpanded" : false
25
+ }
26
+ ],
27
+ "instanceNameFormat" : " GitVersion $(message)" ,
28
+ "inputs" : [
29
+
30
+ {
31
+ "name" : " updateAssemblyInfo" ,
32
+ "type" : " boolean" ,
33
+ "label" : " Update AssemblyInfo's" ,
34
+ "defaultValue" : " false" ,
35
+ "required" : false ,
36
+ "helpMarkDown" : " Whether to update versions in the AssemblyInfo files"
37
+ },
38
+ {
39
+ "name" : " additionalArguments" ,
40
+ "type" : " string" ,
41
+ "label" : " Additional GitVersion.exe arguments" ,
42
+ "defaultValue" : " " ,
43
+ "required" : false ,
44
+ "helpMarkDown" : " Additional arguments to send to GitVersion.exe" ,
45
+ "groupName" : " additional"
46
+ }
47
+ ],
48
+ "execution" : {
49
+ "PowerShell" : {
50
+ "target" : " $(currentDirectory)\\ Run-GitVersion.ps1" ,
51
+ "argumentFormat" : " " ,
52
+ "workingDirectory" : " $(currentDirectory)"
53
+ }
54
+ }
55
+ }
You can’t perform that action at this time.
0 commit comments