mirror of
https://github.com/PepperDash/EssentialsPluginTemplate.git
synced 2026-07-02 08:38:14 +00:00
Merge pull request #11 from PepperDash/feature/fix-generate-version-number
Fix GenerateVersionNumber.ps1
This commit is contained in:
commit
fdf989c472
1 changed files with 5 additions and 1 deletions
6
.github/scripts/GenerateVersionNumber.ps1
vendored
6
.github/scripts/GenerateVersionNumber.ps1
vendored
|
|
@ -22,17 +22,21 @@ switch -regex ($Env:GITHUB_REF) {
|
||||||
}
|
}
|
||||||
'^refs\/heads\/feature\/*.' {
|
'^refs\/heads\/feature\/*.' {
|
||||||
$phase = 'alpha'
|
$phase = 'alpha'
|
||||||
|
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
}
|
}
|
||||||
'^refs\/heads\/release\/*.' {
|
'^refs\/heads\/release\/*.' {
|
||||||
$phase = 'rc'
|
$phase = 'rc'
|
||||||
|
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
}
|
}
|
||||||
'^refs\/heads\/development*.' {
|
'^refs\/heads\/development*.' {
|
||||||
$phase = 'beta'
|
$phase = 'beta'
|
||||||
|
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
}
|
}
|
||||||
'^refs\/heads\/hotfix\/*.' {
|
'^refs\/heads\/hotfix\/*.' {
|
||||||
$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
|
|
||||||
|
|
||||||
Write-Output $newVersionString
|
Write-Output $newVersionString
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue