diff --git a/Chronometer/chronometer.psd1 b/Chronometer/chronometer.psd1 index 066b559..7993982 100644 Binary files a/Chronometer/chronometer.psd1 and b/Chronometer/chronometer.psd1 differ diff --git a/psake.ps1 b/psake.ps1 index cf732c6..d5e8a97 100644 --- a/psake.ps1 +++ b/psake.ps1 @@ -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 = [version] (Step-Version (Get-Metadata -Path $env:BHPSModuleManifest)) + $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 {