Skip to content

Commit e766a15

Browse files
committed
updated build.ps1 for basic CI/CD support
1 parent fa7f082 commit e766a15

File tree

4 files changed

+64
-24
lines changed

4 files changed

+64
-24
lines changed

.vscode/tasks.json

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
// See https://go.microsoft.com/fwlink/?LinkId=733558
1111
// for the documentation about the tasks.json format
12-
"version": "2.0.0",
12+
"version": "2.0.0",
1313
"tasks": [
1414
{
1515
"label": "Build Module",
@@ -18,10 +18,31 @@
1818
"command": "powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File ${workspaceRoot}\\Build.ps1 -BuildModule"
1919
},
2020
"linux": {
21-
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1"
21+
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -BuildModule"
2222
},
2323
"osx": {
24-
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1"
24+
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -BuildModule"
25+
},
26+
"group": {
27+
"kind": "build",
28+
"isDefault": true
29+
},
30+
"presentation": {
31+
"reveal": "always",
32+
"panel": "new"
33+
}
34+
},
35+
{
36+
"label": "Run Tests",
37+
"type": "shell",
38+
"windows": {
39+
"command": "powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File ${workspaceRoot}\\Build.ps1 -Test"
40+
},
41+
"linux": {
42+
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -Test"
43+
},
44+
"osx": {
45+
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -Test"
2546
},
2647
"group": {
2748
"kind": "build",
@@ -51,8 +72,7 @@
5172
"presentation": {
5273
"reveal": "always",
5374
"panel": "new"
54-
},
55-
"problemMatcher": []
75+
}
5676
},
5777
{
5878
"label": "Build, Install, Load, and Publish Module",
@@ -73,8 +93,7 @@
7393
"presentation": {
7494
"reveal": "always",
7595
"panel": "new"
76-
},
77-
"problemMatcher": []
96+
}
7897
},
7998
{
8099
"label": "Insert Missing Comment Based Help",
@@ -98,4 +117,4 @@
98117
}
99118
}
100119
]
101-
}
120+
}

Build.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
param (
44
[parameter(Position = 0, ParameterSetName = 'Build')]
55
[switch]$BuildModule,
6-
[parameter(Position = 2, ParameterSetName = 'Build')]
6+
[parameter(Position = 1, ParameterSetName = 'Build')]
77
[switch]$UploadPSGallery,
8-
[parameter(Position = 3, ParameterSetName = 'Build')]
8+
[parameter(Position = 2, ParameterSetName = 'Build')]
99
[switch]$InstallAndTestModule,
10-
[parameter(Position = 4, ParameterSetName = 'Build')]
10+
[parameter(Position = 3, ParameterSetName = 'Build')]
1111
[version]$NewVersion,
12-
[parameter(Position = 5, ParameterSetName = 'Build')]
12+
[parameter(Position = 4, ParameterSetName = 'Build')]
1313
[string]$ReleaseNotes,
14-
[parameter(Position = 6, ParameterSetName = 'CBH')]
14+
[parameter(Position = 5, ParameterSetName = 'CBH')]
1515
[switch]$AddMissingCBH,
16-
[parameter(Position = 7, ParameterSetName = 'Tests')]
16+
[parameter(Position = 6, ParameterSetName = 'Tests')]
1717
[switch]$Test
1818
)
1919

plugins/plaster/template/scaffold/Build.template

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
param (
44
[parameter(Position = 0, ParameterSetName = 'Build')]
55
[switch]$BuildModule,
6-
[parameter(Position = 2, ParameterSetName = 'Build')]
6+
[parameter(Position = 1, ParameterSetName = 'Build')]
77
[switch]$UploadPSGallery,
8-
[parameter(Position = 3, ParameterSetName = 'Build')]
8+
[parameter(Position = 2, ParameterSetName = 'Build')]
99
[switch]$InstallAndTestModule,
10-
[parameter(Position = 4, ParameterSetName = 'Build')]
10+
[parameter(Position = 3, ParameterSetName = 'Build')]
1111
[version]$NewVersion,
12-
[parameter(Position = 5, ParameterSetName = 'Build')]
12+
[parameter(Position = 4, ParameterSetName = 'Build')]
1313
[string]$ReleaseNotes,
14-
[parameter(Position = 6, ParameterSetName = 'CBH')]
14+
[parameter(Position = 5, ParameterSetName = 'CBH')]
1515
[switch]$AddMissingCBH,
16-
[parameter(Position = 7, ParameterSetName = 'Tests')]
16+
[parameter(Position = 6, ParameterSetName = 'Tests')]
1717
[switch]$Test
1818
)
1919

plugins/plaster/template/scaffold/vscode/tasks.json

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
// See https://go.microsoft.com/fwlink/?LinkId=733558
1111
// for the documentation about the tasks.json format
12-
"version": "2.0.0",
12+
"version": "2.0.0",
1313
"tasks": [
1414
{
1515
"label": "Build Module",
@@ -18,10 +18,31 @@
1818
"command": "powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File ${workspaceRoot}\\Build.ps1 -BuildModule"
1919
},
2020
"linux": {
21-
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1"
21+
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -BuildModule"
2222
},
2323
"osx": {
24-
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1"
24+
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -BuildModule"
25+
},
26+
"group": {
27+
"kind": "build",
28+
"isDefault": true
29+
},
30+
"presentation": {
31+
"reveal": "always",
32+
"panel": "new"
33+
}
34+
},
35+
{
36+
"label": "Run Tests",
37+
"type": "shell",
38+
"windows": {
39+
"command": "powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File ${workspaceRoot}\\Build.ps1 -Test"
40+
},
41+
"linux": {
42+
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -Test"
43+
},
44+
"osx": {
45+
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -Test"
2546
},
2647
"group": {
2748
"kind": "build",
@@ -96,4 +117,4 @@
96117
}
97118
}
98119
]
99-
}
120+
}

0 commit comments

Comments
 (0)