Updated version number handling in build system.

This commit is contained in:
KevinMarquette
2017-02-05 16:12:16 -08:00
parent ef2c558026
commit 2a4a9dc302
2 changed files with 11 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ Task Test -Depends UnitTests {
"JobID: $env:APPVEYOR_JOB_ID"
(New-Object 'System.Net.WebClient').UploadFile(
"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
# Bump the module version
$Version = Get-NextPSGalleryVersion -Name $env:BHProjectName
Update-Metadata -Path $env:BHPSModuleManifest -PropertyName ModuleVersion -Value $Version
$version = Step-Version (Get-Metadata -Path $env:BHPSModuleManifest)
$galleryVersion = Get-NextPSGalleryVersion -Name $env:BHProjectName
if($version -gt $galleryVersion)
{
$version = $galleryVersion
}
$version = [version]::New($version.Major,$version.minor.$version.build,$BHBuildNumber)
Write-Host "Using version: $version"
Update-Metadata -Path $env:BHPSModuleManifest -PropertyName ModuleVersion -Value $version
}
Task Deploy -Depends Build {