10000 Updated build scripts · ModuleBuild/ModuleBuild@96b4ce1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96b4ce1

Browse files
committed
Updated build scripts
1 parent 223b974 commit 96b4ce1

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

Build.ps1

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ param (
1212
[parameter(Position = 5, ParameterSetName = 'Build')]
1313
[string]$ReleaseNotes,
1414
[parameter(Position = 6, ParameterSetName = 'CBH')]
15-
[switch]$AddMissingCBH
15+
[switch]$AddMissingCBH,
16+
[parameter(Position = 7, ParameterSetName = 'Tests')]
17+
[switch]$Test
1618
)
1719

1820
function PrerequisitesLoaded {
@@ -69,6 +71,16 @@ switch ($psCmdlet.ParameterSetName) {
6971
}
7072
}
7173
}
74+
'Tests' {
75+
if ($test) {
76+
try {
77+
Invoke-Build -Task tests
78+
}
79+
catch {
80+
throw
81+
}
82+
}
83+
}
7284
'Build' {
7385
if ($NewVersion -ne $null) {
7486
try {
@@ -110,4 +122,4 @@ switch ($psCmdlet.ParameterSetName) {
110122
}
111123
}
112124
}
113-
}
125+
}

ModuleBuild.build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ task BuildSessionCleanup CleanScratchDirectory, {
872872

873873
#region Main tasks
874874
# Synopsis: Run all tests
875-
task Tests RunMetaTests, RunUnitTests, RunIntergrationTests {
875+
task Tests RunMetaTests, RunUnitTests, RunIntergrationTests, {
876876

877877
}
878878
# Synopsis: Build the module
@@ -897,4 +897,4 @@ task AddMissingCBH Configure, CleanScratchDirectory, InsertCBHInPublicFunctions,
897897

898898
# Synopsis: Default task when running Invoke-Build
899899
task . Tests, Build
900-
#endregion
900+
#endregion

plugins/plaster/template/scaffold/Build.template

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ param (
1212
[parameter(Position = 5, ParameterSetName = 'Build')]
1313
[string]$ReleaseNotes,
1414
[parameter(Position = 6, ParameterSetName = 'CBH')]
15-
[switch]$AddMissingCBH
15+
[switch]$AddMissingCBH,
16+
[parameter(Position = 7, ParameterSetName = 'Tests')]
17+
[switch]$Test
1618
)
1719

1820
function PrerequisitesLoaded {
@@ -69,6 +71,16 @@ switch ($psCmdlet.ParameterSetName) {
6971
}
7072
}
7173
}
74+
'Tests' {
75+
if ($test) {
76+
try {
77+
Invoke-Build -Task tests
78+
}
79+
catch {
80+
throw
81+
}
82+
}
83+
}
7284
'Build' {
7385
if ($NewVersion -ne $null) {
7486
try {
@@ -110,4 +122,4 @@ switch ($psCmdlet.ParameterSetName) {
110122
}
111123
}
112124
}
113-
}
125+
}

0 commit comments

Comments
 (0)
0