mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-02 22:34:57 +00:00
add workflow for 2.0.0 builds
This commit is contained in:
24
.github/scripts/GenerateVersionNumber-2.0.0.ps1
vendored
Normal file
24
.github/scripts/GenerateVersionNumber-2.0.0.ps1
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
$latestVersion = [version]"2.0.0"
|
||||
|
||||
$newVersion = [version]$latestVersion
|
||||
$phase = ""
|
||||
$newVersionString = ""
|
||||
|
||||
switch -regex ($Env:GITHUB_REF) {
|
||||
'^refs\/pull\/*.' {
|
||||
$splitRef = $Env:GITHUB_REF -split "/"
|
||||
$phase = "pr$($splitRef[2])"
|
||||
$newVersionString = "{0}-{3}-{4}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||
}
|
||||
'^refs\/heads\/feature-2.0.0\/*.' {
|
||||
$phase = 'alpha'
|
||||
$newVersionString = "{0}-{3}-{4}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||
}
|
||||
'^refs\/heads\/development-2.0.0' {
|
||||
$phase = 'beta'
|
||||
$newVersionString = "{0}-{3}-{4}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Write-Output $newVersionString
|
||||
Reference in New Issue
Block a user