Merging build versioning into master !deploy
This commit is contained in:
Binary file not shown.
14
psake.ps1
14
psake.ps1
@@ -56,7 +56,7 @@ Task Test -Depends UnitTests {
|
|||||||
"JobID: $env:APPVEYOR_JOB_ID"
|
"JobID: $env:APPVEYOR_JOB_ID"
|
||||||
(New-Object 'System.Net.WebClient').UploadFile(
|
(New-Object 'System.Net.WebClient').UploadFile(
|
||||||
"https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)",
|
"https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)",
|
||||||
(Resolve-Path "$ProjectRoot\$TestFile" )
|
"$ProjectRoot\$TestFile"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,8 +82,16 @@ Task Build -Depends Test {
|
|||||||
Set-ModuleFunctions -Name $env:BHPSModuleManifest -FunctionsToExport $functions
|
Set-ModuleFunctions -Name $env:BHPSModuleManifest -FunctionsToExport $functions
|
||||||
|
|
||||||
# Bump the module version
|
# Bump the module version
|
||||||
$Version = Get-NextPSGalleryVersion -Name $env:BHProjectName
|
$version = [version] (Step-Version (Get-Metadata -Path $env:BHPSModuleManifest))
|
||||||
Update-Metadata -Path $env:BHPSModuleManifest -PropertyName ModuleVersion -Value $Version
|
$galleryVersion = Get-NextPSGalleryVersion -Name $env:BHProjectName
|
||||||
|
if($version -lt $galleryVersion)
|
||||||
|
{
|
||||||
|
$version = $galleryVersion
|
||||||
|
}
|
||||||
|
$version = [version]::New($version.Major,$version.Minor,$version.Build,$env:BHBuildNumber)
|
||||||
|
Write-Host "Using version: $version"
|
||||||
|
|
||||||
|
Update-Metadata -Path $env:BHPSModuleManifest -PropertyName ModuleVersion -Value $version
|
||||||
}
|
}
|
||||||
|
|
||||||
Task Deploy -Depends Build {
|
Task Deploy -Depends Build {
|
||||||
|
|||||||
Reference in New Issue
Block a user