mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-14 04:57:15 +00:00
updating script for forked builds
This commit is contained in:
parent
4d4230d9f4
commit
6b908e18de
1 changed files with 30 additions and 25 deletions
7
.github/scripts/GenerateVersionNumber.ps1
vendored
7
.github/scripts/GenerateVersionNumber.ps1
vendored
|
|
@ -17,7 +17,11 @@ Foreach ($version in $latestVersions) {
|
||||||
$newVersion = [version]$latestVersion
|
$newVersion = [version]$latestVersion
|
||||||
$phase = ""
|
$phase = ""
|
||||||
$newVersionString = ""
|
$newVersionString = ""
|
||||||
switch -regex ($Env:GITHUB_REF) {
|
if(!$Env:GITHUB_REF) {
|
||||||
|
$phase = 'fork'
|
||||||
|
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
|
} else {
|
||||||
|
switch -regex ($Env:GITHUB_REF) {
|
||||||
'^refs\/heads\/main*.' {
|
'^refs\/heads\/main*.' {
|
||||||
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build
|
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build
|
||||||
}
|
}
|
||||||
|
|
@ -43,6 +47,7 @@ switch -regex ($Env:GITHUB_REF) {
|
||||||
$phase = 'hotfix'
|
$phase = 'hotfix'
|
||||||
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue