mirror of
https://github.com/Grace-Solutions/PSProxmox.git
synced 2026-07-26 08:18:19 +00:00
Update build scripts to support version parameter
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@{
|
||||
RootModule = 'PSProxmox.psm1'
|
||||
NestedModules = @('bin\PSProxmox.dll')
|
||||
ModuleVersion = '2025.05.09.1504'
|
||||
ModuleVersion = '2025.05.09.1511'
|
||||
GUID = 'd24f0894-3d0c-4ef1-a41e-b273c3db86ad'
|
||||
Author = 'PSProxmox Team'
|
||||
CompanyName = 'PSProxmox'
|
||||
@@ -107,3 +107,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$ApiKey,
|
||||
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Version = (Get-Date -Format "yyyy.MM.dd.HHmm")
|
||||
)
|
||||
|
||||
# Ensure the module is built
|
||||
Write-Host "Building the module..."
|
||||
Write-Host "Building the module with version $Version..."
|
||||
$env:MODULE_VERSION = $Version
|
||||
& "$PSScriptRoot\build-release-only.ps1"
|
||||
|
||||
# Get the release directory
|
||||
|
||||
@@ -5,8 +5,12 @@
|
||||
$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"
|
||||
# Set the version based on the environment variable or current date and time
|
||||
if ($env:MODULE_VERSION) {
|
||||
$version = $env:MODULE_VERSION
|
||||
} else {
|
||||
$version = Get-Date -Format "yyyy.MM.dd.HHmm"
|
||||
}
|
||||
Write-Host "Building PSProxmox version $version"
|
||||
|
||||
# Update the module version in the PSD1 file
|
||||
|
||||
Reference in New Issue
Block a user