From f62d635e5f74e59a4275c0229ef534f0aa7a47d1 Mon Sep 17 00:00:00 2001 From: Alphaeus Mote Date: Fri, 9 May 2025 16:54:03 -0400 Subject: [PATCH] Update version to 2025.05.10.1500 and prepare for release --- Module/PSProxmox.psd1 | 6 ++++-- Scripts/build.ps1 | 16 ++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Module/PSProxmox.psd1 b/Module/PSProxmox.psd1 index 8263d42..172a4b2 100644 --- a/Module/PSProxmox.psd1 +++ b/Module/PSProxmox.psd1 @@ -1,5 +1,5 @@ @{ - ModuleVersion = '2025.05.10.1400' + ModuleVersion = '2025.05.10.1500' GUID = 'd24f0894-3d0c-4ef1-a41e-b273c3db86ad' Author = 'PSProxmox Team' CompanyName = 'PSProxmox' @@ -92,7 +92,7 @@ Tags = @('Proxmox', 'VirtualMachine', 'Cluster', 'Management') LicenseUri = 'https://github.com/Grace-Solutions/PSProxmox/blob/main/LICENSE' ProjectUri = 'https://github.com/Grace-Solutions/PSProxmox' - ReleaseNotes = 'Moved repository to Grace-Solutions organization. Added regex and wildcard filtering to Get-* cmdlets. See https://github.com/Grace-Solutions/PSProxmox/releases/tag/v2025.05.10.1400' + ReleaseNotes = 'Added cloud image template functionality. See https://github.com/Grace-Solutions/PSProxmox/releases/tag/v2025.05.10.1500' } } } @@ -119,6 +119,8 @@ + + diff --git a/Scripts/build.ps1 b/Scripts/build.ps1 index 2e608af..09117ce 100644 --- a/Scripts/build.ps1 +++ b/Scripts/build.ps1 @@ -5,15 +5,16 @@ $scriptRoot = $PSScriptRoot $rootPath = Split-Path -Parent $scriptRoot -# Set the version based on the current date and time -$version = Get-Date -Format "yyyy.MM.dd.HHmm" -Write-Host "Building PSProxmox version $version" - -# Update the module version in the PSD1 file +# Get the version from the module manifest $psd1Path = "$rootPath\Module\PSProxmox.psd1" $psd1Content = Get-Content -Path $psd1Path -Raw -$psd1Content = $psd1Content -replace "ModuleVersion = '.*'", "ModuleVersion = '$version'" -Set-Content -Path $psd1Path -Value $psd1Content +if ($psd1Content -match "ModuleVersion\s*=\s*'([^']+)'") { + $version = $matches[1] +} else { + # Fallback to current date and time if version not found in manifest + $version = Get-Date -Format "yyyy.MM.dd.HHmm" +} +Write-Host "Building PSProxmox version $version" # Create the release directory structure $releaseBaseDir = "$rootPath\Release" @@ -39,7 +40,6 @@ dotnet build "$rootPath\PSProxmox\PSProxmox.Main.csproj" -c Release -o $releaseB # Copy the module files to the release directory Copy-Item -Path "$rootPath\Module\PSProxmox.psd1" -Destination $releaseVersionDir -Force -Copy-Item -Path "$rootPath\Module\PSProxmox.psm1" -Destination $releaseVersionDir -Force Copy-Item -Path "$rootPath\LICENSE" -Destination $releaseVersionDir -Force Copy-Item -Path "$rootPath\README.md" -Destination $releaseVersionDir -Force Copy-Item -Path "$scriptRoot\Install-PSProxmox.ps1" -Destination $releaseVersionDir -Force