File tree Expand file tree Collapse file tree 2 files changed +24
-9
lines changed
Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ Warren F. (RamblingCookieMonster)
66#>
77
88[cmdletbinding ()]
9- param ($Task = ' Default' )
9+ param (
10+ $Task = ' Default' ,
11+
12+ [ValidateSet (' Build' , ' Minor' , ' Major' )]
13+ $StepVersionBy = ' Build'
14+ )
1015
1116# Grab nuget bits, install modules, set build variables, start build.
1217Get-PackageProvider - Name NuGet - ForceBootstrap | Out-Null
@@ -26,5 +31,12 @@ ForEach ($Module in $Modules) {
2631$Path = (Resolve-Path $PSScriptRoot \..).Path
2732Set-BuildEnvironment - Path $Path
2833
29- Invoke-psake - buildFile $PSScriptRoot \psake.ps1 - taskList $Task - nologo
30- exit ([int ](-not $psake.build_success ))
34+ $invokepsakeSplat = @ {
35+ buildFile = " $PSScriptRoot \psake.ps1"
36+ taskList = $Task
37+ properties = @ {' StepVersionBy' = $StepVersionBy }
38+ nologo = $true
39+ }
40+ Invoke-psake @invokepsakeSplat
41+
42+ exit ([int ](-not $psake.build_success ))
Original file line number Diff line number Diff line change 11# PSake makes variables declared here available in other scriptblocks
22Properties {
33 # Find the build folder based on build system
4- $ProjectRoot = Resolve-Path $ENV: BHProjectPath
5- if (-not $ProjectRoot )
6- {
7- $ProjectRoot = Resolve-Path " $PSScriptRoot \.."
8- }
4+ $ProjectRoot = Resolve-Path $ENV: BHProjectPath
5+ if (-not $ProjectRoot )
6+ {
7+ $ProjectRoot = Resolve-Path " $PSScriptRoot \.."
8+ }
9+
10+ #
11+ $StepVersionBy = ' Build'
912
1013 $Timestamp = Get-date - uformat " %Y%m%d-%H%M%S"
1114 $PSVersion = $PSVersionTable.PSVersion.Major
@@ -91,7 +94,7 @@ Task Build -Depends Test {
9194 Set-ModuleFunctions - Name $env: BHPSModuleManifest - FunctionsToExport $functions
9295
9396 # Bump the module version
94- $version = [version ] (Step-Version (Get-Metadata - Path $env: BHPSModuleManifest ))
97+ $version = [version ] (Step-Version - Version (Get-Metadata - Path $env: BHPSModuleManifest ) - By $StepVersionBy )
9598 $galleryVersion = Get-NextPSGalleryVersion - Name $env: BHProjectName
9699 if ($version -lt $galleryVersion )
97100 {
You can’t perform that action at this time.
0 commit comments