mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-31 13:37:46 +01:00
Fix branch name when building main branch on GH (#4193)
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com> Fixes #4191.
This commit is contained in:
parent
fbb3a9a0a4
commit
347751a826
@ -46,8 +46,10 @@ def commitsSinceLastTag() {
|
||||
|
||||
@SuppressWarnings('GrMethodMayBeStatic')
|
||||
def headBranchName() {
|
||||
if (System.getenv("GITHUB_HEAD_REF") != null) {
|
||||
if (System.getenv("GITHUB_HEAD_REF") != null && !System.getenv("GITHUB_HEAD_REF").isEmpty()) {
|
||||
return System.getenv("GITHUB_HEAD_REF")
|
||||
} else if (System.getenv("GITHUB_REF") != null && !System.getenv("GITHUB_REF").isEmpty()) {
|
||||
return System.getenv("GITHUB_REF").replaceFirst("refs/heads/", "")
|
||||
}
|
||||
|
||||
if (!indraGit.isPresent()) {
|
||||
|
Loading…
Reference in New Issue
Block a user