Update executable names for beta and alpha paths.
This commit is contained in:
48
deploy/test-artifact-naming.ps1
Normal file
48
deploy/test-artifact-naming.ps1
Normal file
@@ -0,0 +1,48 @@
|
||||
# Test script to demonstrate artifact naming for different versions
|
||||
Write-Host "=== Artifact Naming Test ==="
|
||||
Write-Host ""
|
||||
|
||||
# Test current version
|
||||
$packageJsonPath = ".\package.json"
|
||||
$packageJson = Get-Content $packageJsonPath | ConvertFrom-Json
|
||||
$currentVersion = $packageJson.version
|
||||
|
||||
Write-Host "Current version: $currentVersion"
|
||||
|
||||
# Function to get artifact suffix
|
||||
function Get-ArtifactSuffix($version) {
|
||||
if ($version -match "alpha") {
|
||||
return "alpha-${version}-"
|
||||
} elseif ($version -match "beta") {
|
||||
return "beta-${version}-"
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
# Test scenarios
|
||||
$testVersions = @(
|
||||
"1.0.5", # Release version
|
||||
"1.0.5-alpha.2", # Alpha version
|
||||
"1.0.5-beta.1", # Beta version
|
||||
"2.0.0-alpha.1", # Another alpha
|
||||
"1.5.0-beta.3" # Another beta
|
||||
)
|
||||
|
||||
Write-Host "Test scenarios:"
|
||||
Write-Host "=================="
|
||||
|
||||
foreach ($version in $testVersions) {
|
||||
$suffix = Get-ArtifactSuffix $version
|
||||
$artifactName = "imex-partner-${suffix}x64.exe"
|
||||
|
||||
Write-Host "Version: $version"
|
||||
Write-Host " Suffix: '$suffix'"
|
||||
Write-Host " Result: $artifactName"
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
Write-Host "Current configuration will produce:"
|
||||
$currentSuffix = Get-ArtifactSuffix $currentVersion
|
||||
$currentArtifact = "imex-partner-${currentSuffix}x64.exe"
|
||||
Write-Host " $currentArtifact"
|
||||
Reference in New Issue
Block a user