mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-19 12:09:12 +00:00
Trying a better way to get the git branch for file names
This commit is contained in:
1 parent
e28636d571
commit
68aea70990
1 file changed
+3
@@ -26,6 +26,9 @@ import org.ajoberstar.grgit.Grgit
|
||||
def repo = Grgit.open(project.file('.'))
|
||||
project.ext.gitHash = repo.log().find().abbreviatedId
|
||||
def branchname = repo.branch.getCurrent().fullName
|
||||
if (branchname.contains('HEAD')) {
|
||||
branchname = System.getenv("GIT_BRANCH")
|
||||
}
|
||||
branchname = branchname.substring(branchname.lastIndexOf('/') + 1)
|
||||
|
||||
boolean dev = System.getenv("RELEASE") == null || System.getenv("RELEASE").equalsIgnoreCase("false")
|
||||
|
||||
Reference in new issue
Block a user