-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathtask.json
76 lines (76 loc) · 2.6 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
{
"id": "9240B5C1-A1B2-4799-9325-E071C63236FB",
"name": "ReplaceTokens",
"friendlyName": "Replace Tokens",
"description": "Replaces tokens in a file using RegEx. Values come from any variable defined in the current Environment.",
"author": "Colin Dembovsky (colinsalmcorner.com)",
"helpMarkDown": "[More Information](https://github.com/colindembovsky/cols-agent-tasks/tree/master/Tasks/ReplaceTokens)",
"category": "Utility",
"visibility": [
"Build",
"Release"
],
"version": {
"Major": "1",
"Minor": "2",
"Patch": "28"
},
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"minimumAgentVersion": "1.91.0",
"instanceNameFormat": "Replace tokens in $(sourcePath)",
"inputs": [
{
"name": "sourcePath",
"type": "filePath",
"label": "Source Path",
"defaultValue": "",
"helpMarkDown": "Path to the file(s) containing tokens. Leave empty to use the sources directory. NOTE: this is case sensitive for non-Windows systems. This should be a path containing the file, not the file itself.",
"required": false
},
{
"name": "filePattern",
"type": "string",
"label": "Target File Pattern",
"defaultValue": "*.config",
"helpMarkDown": "File pattern to find in source path. Supports minimatch. NOTE: this is case sensitive for non-Windows systems.",
"required": true
},
{
"name": "warningsAsErrors",
"type": "boolean",
"label": "Treat warnings as errors",
"defaultValue": false,
"helpMarkDown": "When switched to true, warnings are treated as errors causing breakage of build."
},
{
"name": "tokenRegex",
"type": "string",
"label": "Token Regex",
"defaultValue": "__(\\w+)__",
"helpMarkDown": "Regex to use for token replacement. Must include a group match.",
"required": true,
"groupName": "advanced"
},
{
"name": "secretTokens",
"type": "string",
"label": "Secret Tokens (only for TFS 2015)",
"defaultValue": "",
"helpMarkDown": "A configuration variable can be set as 'secret' in release definition to have its value hidden. For tokens need to be replaced with the value of secret configuration variables, they can be specified here using the following format: key1:$(secret1);key2:$(secret2). Non-secret configuration variable do not need to be specified explicitly here.",
"required": false,
"groupName": "advanced"
}
],
"execution": {
"Node16": {
"target": "replaceTokens.js",
"argumentFormat": ""
}
}
}