Merging build versioning into master !deploy

This commit is contained in:
KevinMarquette
2017-02-05 16:56:53 -08:00
2 changed files with 11 additions and 3 deletions

Binary file not shown.

View File

@@ -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 {