mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 22:37:06 -04:00
fix: use GITHUB_SHA instead of the git command
This commit is contained in:
parent
e11b1f37b9
commit
b0dc689ba7
@ -28,7 +28,7 @@ import org.tukaani.xz.LZMA2Options
|
|||||||
import org.tukaani.xz.XZOutputStream
|
import org.tukaani.xz.XZOutputStream
|
||||||
|
|
||||||
def dev = ""
|
def dev = ""
|
||||||
def shortcommit = 'git rev-parse --short HEAD'.execute().text.trim().toUpperCase()
|
def shortcommit = System.getenv("GITHUB_SHA").toUpperCase().substring(0, 7)
|
||||||
if (!shortcommit.isEmpty()) dev = "dev-" + shortcommit
|
if (!shortcommit.isEmpty()) dev = "dev-" + shortcommit
|
||||||
def buildnumber = System.getenv("BUILD_NUMBER") ?: dev ?: "SNAPSHOT"
|
def buildnumber = System.getenv("BUILD_NUMBER") ?: dev ?: "SNAPSHOT"
|
||||||
if (System.getenv("BUILD_NUMBER") != null && System.getenv("BUILD_NUMBER_OFFSET") != null)
|
if (System.getenv("BUILD_NUMBER") != null && System.getenv("BUILD_NUMBER_OFFSET") != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user