Updated build logic

This commit is contained in:
KevinMarquette
2017-02-05 16:40:19 -08:00
parent 29fb255aab
commit 5694f4c00e
2 changed files with 3 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
RootModule = 'chronometer.psm1' RootModule = 'chronometer.psm1'
# Version number of this module. # Version number of this module.
ModuleVersion = '0.4.0' ModuleVersion = '0.4.1'
# ID used to uniquely identify this module # ID used to uniquely identify this module
GUID = 'f3719c3c-008a-4b25-b94d-fc9f587f62dd' GUID = 'f3719c3c-008a-4b25-b94d-fc9f587f62dd'

View File

@@ -84,11 +84,11 @@ Task Build -Depends Test {
# Bump the module version # Bump the module version
$version = Step-Version (Get-Metadata -Path $env:BHPSModuleManifest) $version = Step-Version (Get-Metadata -Path $env:BHPSModuleManifest)
$galleryVersion = Get-NextPSGalleryVersion -Name $env:BHProjectName $galleryVersion = Get-NextPSGalleryVersion -Name $env:BHProjectName
if($version -gt $galleryVersion) if($version -lt $galleryVersion)
{ {
$version = $galleryVersion $version = $galleryVersion
} }
$version = [version]::New($version.Major,$version.Minor,$version.Build,$BHBuildNumber) $version = [version]::New($version.Major,$version.Minor,$version.Build,$env:BHBuildNumber)
Write-Host "Using version: $version" Write-Host "Using version: $version"
Update-Metadata -Path $env:BHPSModuleManifest -PropertyName ModuleVersion -Value $version Update-Metadata -Path $env:BHPSModuleManifest -PropertyName ModuleVersion -Value $version