forked from colindembovsky/cols-agent-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.json
154 lines (154 loc) · 4.91 KB
/
task.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
"id": "5b4d14d0-3868-11e4-a31d-3f0a2d8202f4",
"name": "VersionAssemblies",
"friendlyName": "Version Assemblies",
"description": "Updates the version number of the assemblies to match the build number",
"author": "Colin Dembovsky (colinsalmcorner.com)",
"helpMarkDown": "[More Information](https://github.com/colindembovsky/cols-agent-tasks/tree/master/Tasks/VersionAssemblies)",
"category": "Build",
"visibility": [
"Build"
],
"demands": [],
"version": {
"Major": "2",
"Minor": "2",
"Patch": "34"
},
"minimumAgentVersion": "1.91.0",
"instanceNameFormat": "Version Assemblies using $(filePattern)",
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"inputs": [
{
"name": "sourcePath",
"type": "filePath",
"label": "Source Path",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path in which to search for version files (like AssemblyInfo.* files). Leave empty to use the sources directory. NOTE: this is case sensitive for non-Windows systems."
},
{
"name": "filePattern",
"type": "string",
"label": "File Pattern",
"defaultValue": "**\\AssemblyInfo.*",
"required": true,
"helpMarkDown": "File filter to replace version info. The version number pattern should exist somewhere in the file(s). Supports minimatch. NOTE: this is case sensitive for non-Windows systems."
},
{
"name": "versionSource",
"type": "pickList",
"label": "Version Source",
"defaultValue": "buildNumber",
"options":{
"buildNumber": "Build Number",
"variable": "Variable"
},
"required": true,
"helpMarkDown": "The source for the version number. Defaults to the build number, but can be a build variable."
},
{
"name": "customNumberVariable",
"type": "string",
"label": "Variable to use",
"defaultValue": "myBuildNumber",
"required": false,
"helpMarkDown": "Variable to use for the version number. Do not specify $() - just enter the name.",
"visibleRule": "versionSource=variable"
},
{
"name": "versionFormat",
"type": "pickList",
"label": "Version Extract Pattern",
"defaultValue": "fourParts",
"options":{
"fourParts": "1.0.0.0",
"threeParts": "1.0.0",
"custom": "Custom Regex"
},
"required": true,
"helpMarkDown": "Pattern to use to extract the build number as well as default replacement pattern."
},
{
"name": "customBuildRegex",
"type": "string",
"label": "Custom Regex Find Pattern",
"defaultValue": "\\d+\\.\\d+\\.\\d+\\.\\d+",
"required": false,
"helpMarkDown": "Regular Expression to extract version from build number. This is also the default replace regex (unless otherwise specified in Advanced settings).",
"visibleRule": "versionFormat=custom"
},
{
"name": "replaceVersionFormat",
"type": "pickList",
"label": "Replace Pattern",
"defaultValue": "fourParts",
"options":{
"fourParts": "1.0.0.0",
"threeParts": "1.0.0",
"custom": "Custom Regex"
},
"required": true,
"helpMarkDown": "Pattern to use to replace the version in the files.",
"groupName": "advanced"
},
{
"name": "customReplaceRegex",
"type": "string",
"label": "Custom Regex Replace Pattern",
"defaultValue": "",
"required": false,
"helpMarkDown": "Regular Expression to replace with in files.",
"visibleRule": "replaceVersionFormat=custom",
"groupName": "advanced"
},
{
"name": "buildRegexIndex",
"type": "string",
"label": "Build Regex Group Index",
"defaultValue": "0",
"required": false,
"helpMarkDown": "Index of group in build regular expression that you want to use as the version number. Leave as 0 if you have no groups.",
"groupName": "advanced"
},
{
"name": "replacePrefix",
"type": "string",
"label": "Prefix for Replacements",
"defaultValue": "",
"required": false,
"helpMarkDown": "String to prefix the regex replacement with.",
"groupName": "advanced"
},
{
"name": "replacePostfix",
"type": "string",
"label": "Postfix for Replacements",
"defaultValue": "",
"required": false,
"helpMarkDown": "String to postfix the regex replacement with.",
"groupName": "advanced"
},
{
"name": "failIfNoMatchFound",
"type": "boolean",
"label": "Fail If No Target Match Found",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Fail the build if no match is found for the replace regex in the target file(s).",
"groupName": "advanced"
}
],
"execution": {
"Node": {
"target": "versionAssemblies.js",
"argumentFormat": ""
}
}
}