8000 updated build scripts · ModuleBuild/ModuleBuild@ed0c4c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit ed0c4c0

Browse files
committed
updated build scripts
1 parent 401c0e3 commit ed0c4c0

22 files changed

+156
-149
lines changed

ModuleBuild.build.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ task NewVersion LoadRequiredModules, LoadModuleManifest, {
768768
}
769769

770770
# Synopsis: Update current module manifest with the version defined in the build config file (if they differ)
771-
task UpdateRelease LoadRequiredModules, LoadModuleManifest, {
771+
task UpdateRelease NewVersion, LoadRequiredModules, LoadModuleManifest, {
772772
Write-Description White 'Updating the release notes of this module' -accent
773773

774774
$ModuleManifestFullPath = Join-Path $BuildRoot "$($Script:BuildEnv.ModuleToBuild).psd1"
@@ -900,3 +900,4 @@ task AddMissingCBH Configure, CleanScratchDirectory, InsertCBHInPublicFunctions,
900900
# Synopsis: Default task when running Invoke-Build
901901
task . Build
902902
#endregion
903+

build/ModuleBuild.buildenvironment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if ((Get-Variable 'BuildEnv' -ErrorAction:SilentlyContinue) -eq $null) {
1818
ForceInstallModule = $true
1919
Encoding = 'utf8'
2020
ModuleToBuild = 'ModuleBuild'
21-
ModuleVersion = '0.2.4'
21+
ModuleVersion = '0.3.0'
2222
ModuleWebsite = 'https://github.com/zloeber/ModuleBuild'
2323
ModuleCopyright = "(c) $((get-date).Year.ToString()) Zachary Loeber. All rights reserved."
2424
ModuleLicenseURI = 'https://github.com/zloeber/ModuleBuild/LICENSE.md'

build/dependencies/PSDepend/build.depend.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
source = 'PSGalleryModule'
2121
}
2222
ModuleBuildToolsTemp = @{
23-
version = '0.0.3'
23+
version = '0.0.5'
2424
source = 'PSGalleryModule'
2525
}
2626
}

build/reports/0.3.0/CodeHealthReport-Private.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ <h1>
189189
<div class="col-sm-4 col-md-5 col-lg-4 right-header">
190190
<h5>
191191
Analyzed path :<span class="right-header-data"> src\private</span><br>
192-
Analysis date :<span class="right-header-data"> 2020-04-23 17:43:19Z</span>
192+
Analysis date :<span class="right-header-data"> 2020-04-23 19:25:10Z</span>
193193
</h5>
194194
</div>
195195
</div>

build/reports/0.3.0/CodeHealthReport-Public.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ <h1>
189189
<div class="col-sm-4 col-md-5 col-lg-4 right-header">
190190
<h5>
191191
Analyzed path :<span class="right-header-data"> src\public</span><br>
192-
Analysis date :<span class="right-header-data"> 2020-04-23 17:40:50Z</span>
192+
Analysis date :<span class="right-header-data"> 2020-04-23 19:23:50Z</span>
193193
</h5>
194194
</div>
195195
</div>

plugins/plaster/template/plasterManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
templateType="Project" xmlns="http://www.microsoft.com/schemas/PowerShell/Plaster/v1">
55
<metadata>
66
<name>ModuleBuild</name>
7-
<id>cc85d215-aa15-47ac-a72e-58e511ad2c4e</id>
7+
<id>8e4cd991-8998-4eff-82ba-dbe0a2b63b74</id>
88
<version>0.0.1</version>
99
<title>New ModuleBuild Project</title>
1010
<description>Create a new PowerShell Module with a ModuleBuild wrapper</description>

plugins/plaster/template/scaffold/Build.template

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ param (
55
[switch]$BuildModule,
66
[parameter(Position = 1,ParameterSetName = 'Build')]
77
[switch]$TestBuildAndInstallModule,
8-
[parameter(Position = 2, ParameterSetName = 'Build')]
9-
[switch]$UploadPSGallery,
10-
[parameter(Position = 3, ParameterSetName = 'Build')]
11-
[switch]$InstallAndTestModule,
12-
[parameter(Position = 4, ParameterSetName = 'Build')]
8+
[parameter(Position = 2, ParameterSetName = 'UpdateRelease')]
9+
[switch]$UpdateRelease,
10+
[parameter(Position = 3, ParameterSetName = 'UpdateRelease')]
1311
[version]$NewVersion,
14-
[parameter(Position = 5, ParameterSetName = 'Build')]
12+
[parameter(Position = 4, ParameterSetName = 'UpdateRelease')]
1513
[string]$ReleaseNotes,
14+
[parameter(Position = 5, ParameterSetName = 'UpdateRelease')]
15+
[switch]$UploadPSGallery,
1616
[parameter(Position = 6, ParameterSetName = 'CBH')]
1717
[switch]$AddMissingCBH,
1818
[parameter(Position = 7, ParameterSetName = 'Tests')]
@@ -69,90 +69,91 @@ if (-not (PrerequisitesLoaded)) {
6969
}
7070

7171
switch ($psCmdlet.ParameterSetName) {
72-
'CBH' {
73-
if ($AddMissingCBH) {
72+
'Build' {
73+
# If no parameters were specified or the build action was manually specified then kick off a standard build
74+
if (($psboundparameters.count -eq 0) -or ($BuildModule)) {
7475
try {
75-
Invoke-Build -Task AddMissingCBH
76+
Invoke-Build
7677
}
7778
catch {
78-
throw
79+
Write-Host 'Build Failed with the following error:'
80+
throw $_
7981
}
8082
}
81-
}
82-
'Tests' {
83-
if ($test) {
83+
84+
# Test, Build Installd and test load the module
85+
if ($TestBuildAndInstallModule) {
8486
try {
85-
Invoke-Build -Task tests
87+
Invoke-Build -Task TestBuildAndInstallModule
8688
}
8789
catch {
88-
throw
90+
Write-Host 'Test, Build Installd and test load the module of the module failed:'
91+
throw $_
8992
}
9093
}
91-
if ($TestMetaOnly) {
94+
}
95+
'CBH' {
96+
if ($AddMissingCBH) {
9297
try {
93-
Invoke-Build -Task RunMetaTests
98+
Invoke-Build -Task AddMissingCBH
9499
}
95100
catch {
96-
throw
101+
throw $_
97102
}
98103
}
99-
if ($TestUnitOnly) {
104+
}
105+
'UpdateRelease' {
106+
if ($UpdateRelease -ne $null) {
100107
try {
101-
Invoke-Build -Task RunUnitTests
108+
Invoke-Build -Task UpdateRelease -NewVersion $NewVersion -ReleaseNotes $ReleaseNotes
102109
}
103110
catch {
104-
throw
111+
throw $_
105112
}
106113
}
107-
if ($TestIntergrationOnly) {
114+
115+
if ($UploadPSGallery) {
108116
try {
109-
Invoke-Build -Task RunIntergrationTests
117+
Invoke-Build -Task PublishPSGallery
110118
}
111119
catch {
112-
throw
120+
throw 'Unable to upload project to the PowerShell Gallery!'
113121
}
114122
}
115123
}
116-
'Build' {
117-
# If no parameters were specified or the build action was manually specified then kick off a standard build
118-
if (($psboundparameters.count -eq 0) -or ($BuildModule)) {
124+
'Tests' {
125+
if ($test) {
119126
try {
120-
Invoke-Build
127+
Invoke-Build -Task tests
121128
}
122129
catch {
123-
Write-Host 'Build Failed with the following error:'
124-
throw $_
130+
throw
125131
}
126132
}
127-
128-
# Test, Build Installd and test load the module
129-
if ($TestBuildAndInstallModule) {
133+
if ($TestMetaOnly) {
130134
try {
131-
Invoke-Build -Task TestBuildAndInstallModule
135+
Invoke-Build -Task RunMetaTests
132136
}
133137
catch {
134-
Write-Host 'Test, Build Installd and test load the module of the module failed:'
135-
throw $_
138+
throw
136139
}
137140
}
138-
139-
if ($NewVersion -ne $null) {
141+
if ($TestUnitOnly) {
140142
try {
141-
Invoke-Build -Task UpdateVersion -NewVersion $NewVersion -ReleaseNotes $ReleaseNotes
143+
Invoke-Build -Task RunUnitTests
142144
}
143145
catch {
144-
throw $_
146+
throw
145147
}
146148
}
147-
148-
# Upload to gallery?
149-
if ($UploadPSGallery) {
149+
if ($TestIntergrationOnly) {
150150
try {
151-
Invoke-Build -Task PublishPSGallery
151+
Invoke-Build -Task RunIntergrationTests
152152
}
153153
catch {
154-
throw 'Unable to upload project to the PowerShell Gallery!'
154+
throw
155155
}
156156
}
157157
}
158158
}
159+

plugins/plaster/template/scaffold/build/dependencies/PSDepend/build.depend.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
source = 'PSGalleryModule'
2121
}
2222
ModuleBuildToolsTemp = @{
23-
version = '0.0.3'
23+
version = '0.0.5'
2424
source = 'PSGalleryModule'
2525
}
2626
}

plugins/plaster/template/scaffold/modulename.build.template

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ task NewVersion LoadRequiredModules, LoadModuleManifest, {
768768
}
769769

770770
# Synopsis: Update current module manifest with the version defined in the build config file (if they differ)
771-
task UpdateRelease LoadRequiredModules, LoadModuleManifest, {
771+
task UpdateRelease NewVersion, LoadRequiredModules, LoadModuleManifest, {
772772
Write-Description White 'Updating the release notes of this module' -accent
773773

774774
$ModuleManifestFullPath = Join-Path $BuildRoot "$($Script:BuildEnv.ModuleToBuild).psd1"
@@ -900,3 +900,4 @@ task AddMissingCBH Configure, CleanScratchDirectory, InsertCBHInPublicFunctions,
900900
# Synopsis: Default task when running Invoke-Build
901901
task . Build
902902
#endregion
903+

release/0.3.0/plugins/plaster/template/plasterManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
templateType="Project" xmlns="http://www.microsoft.com/schemas/PowerShell/Plaster/v1">
55
<metadata>
66
<name>ModuleBuild</name>
7-
<id>cc85d215-aa15-47ac-a72e-58e511ad2c4e</id>
7+
<id>8e4cd991-8998-4eff-82ba-dbe0a2b63b74</id>
88
<version>0.0.1</version>
99
<title>New ModuleBuild Project</title>
1010
<description>Create a new PowerShell Module with a ModuleBuild wrapper</description>

release/0.3.0/plugins/plaster/template/scaffold/Build.template

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ param (
55
[switch]$BuildModule,
66
[parameter(Position = 1,ParameterSetName = 'Build')]
77
[switch]$TestBuildAndInstallModule,
8-
[parameter(Position = 2, ParameterSetName = 'Build')]
9-
[switch]$UploadPSGallery,
10-
[parameter(Position = 3, ParameterSetName = 'Build')]
11-
[switch]$InstallAndTestModule,
12-
[parameter(Position = 4, ParameterSetName = 'Build')]
8+
[parameter(Position = 2, ParameterSetName = 'UpdateRelease')]
9+
[switch]$UpdateRelease,
10+
[parameter(Position = 3, ParameterSetName = 'UpdateRelease')]
1311
[version]$NewVersion,
14-
[parameter(Position = 5, ParameterSetName = 'Build')]
12+
[parameter(Position = 4, ParameterSetName = 'UpdateRelease')]
1513
[string]$ReleaseNotes,
14+
[parameter(Position = 5, ParameterSetName = 'UpdateRelease')]
15+
[switch]$UploadPSGallery,
1616
[parameter(Position = 6, ParameterSetName = 'CBH')]
1717
[switch]$AddMissingCBH,
1818
[parameter(Position = 7, ParameterSetName = 'Tests')]
@@ -69,90 +69,91 @@ if (-not (PrerequisitesLoaded)) {
6969
}
7070

7171
switch ($psCmdlet.ParameterSetName) {
72-
'CBH' {
73-
if ($AddMissingCBH) {
72+
'Build' {
73+
# If no parameters were specified or the build action was manually specified then kick off a standard build
74+
if (($psboundparameters.count -eq 0) -or ($BuildModule)) {
7475
try {
75-
Invoke-Build -Task AddMissingCBH
76+
Invoke-Build
7677
}
7778
catch {
78-
throw
79+
Write-Host 'Build Failed with the following error:'
80+
throw $_
7981
}
8082
}
81-
}
82-
'Tests' {
83-
if ($test) {
83+
84+
# Test, Build Installd and test load the module
85+
if ($TestBuildAndInstallModule) {
8486
try {
85-
Invoke-Build -Task tests
87+
Invoke-Build -Task TestBuildAndInstallModule
8688
}
8789
catch {
88-
throw
90+
Write-Host 'Test, Build Installd and test load the module of the module failed:'
91+
throw $_
8992
}
9093
}
91-
if ($TestMetaOnly) {
94+
}
95+
'CBH' {
96+
if ($AddMissingCBH) {
9297
try {
93-
Invoke-Build -Task RunMetaTests
98+
Invoke-Build -Task AddMissingCBH
9499
}
95100
catch {
96-
throw
101+
throw $_
97102
}
98103
}
99-
if ($TestUnitOnly) {
104+
}
105+
'UpdateRelease' {
106+
if ($UpdateRelease -ne $null) {
100107
try {
101-
Invoke-Build -Task RunUnitTests
108+
Invoke-Build -Task UpdateRelease -NewVersion $NewVersion -ReleaseNotes $ReleaseNotes
102109
}
103110
catch {
104-
throw
111+
throw $_
105112
}
106113
}
107-
if ($TestIntergrationOnly) {
114+
115+
if ($UploadPSGallery) {
108116
try {
109-
Invoke-Build -Task RunIntergrationTests
117+
Invoke-Build -Task PublishPSGallery
110118
}
111119
catch {
112-
throw
120+
throw 'Unable to upload project to the PowerShell Gallery!'
113121
}
114122
}
115123
}
116-
'Build' {
117-
# If no parameters were specified or the build action was manually specified then kick off a standard build
118-
if (($psboundparameters.count -eq 0) -or ($BuildModule)) {
124+
'Tests' {
125+
if ($test) {
119126
try {
120-
Invoke-Build
127+
Invoke-Build -Task tests
121128
}
122129
catch {
123-
Write-Host 'Build Failed with the following error:'
124-
throw $_
130+
throw
125131
}
126132
}
127-
128-
# Test, Build Installd and test load the module
129-
if ($TestBuildAndInstallModule) {
133+
if ($TestMetaOnly) {
130134
try {
131-
Invoke-Build -Task TestBuildAndInstallModule
135+
Invoke-Build -Task RunMetaTests
132136
}
133137
catch {
134-
Write-Host 'Test, Build Installd and test load the module of the module failed:'
135-
throw $_
138+
throw
136139
}
137140
}
138-
139-
if ($NewVersion -ne $null) {
141+
if ($TestUnitOnly) {
140142
try {
141-
Invoke-Build -Task UpdateVersion -NewVersion $NewVersion -ReleaseNotes $ReleaseNotes
143+
Invoke-Build -Task RunUnitTests
142144
}
143145
catch {
144-
throw $_
146+
throw
145147
}
146148
}
147-
148-
# Upload to gallery?
149-
if ($UploadPSGallery) {
149+
if ($TestIntergrationOnly) {
150150
try {
151-
Invoke-Build -Task PublishPSGallery
151+
Invoke-Build -Task RunIntergrationTests
152152
}
153153
catch {
154-
throw 'Unable to upload project to the PowerShell Gallery!'
154+
throw
155155
}
156156
}
157157
}
158158
}
159+

0 commit comments

Comments
 (0)
0