Jenkins_Pipeline_Library/vars/detectUnityVersion.groovy
2025-12-26 17:47:05 +08:00

18 lines
636 B
Groovy

//=================================================================
// Byway Studios Inc. Confidential Information.
// Copyright Byway Studios Inc. All rights reserved
//=================================================================
def call(pathToProjectVersion)
{
unsafeEcho "Detected Unity Version begin"
String projectVersionContents = readFile(pathToProjectVersion)
unsafeEcho "Get projectVersionContents: " + projectVersionContents
String unityVersion = projectVersionContents.split('\n')[0].split(':')[1].trim()
unsafeEcho "Detected Unity Version as: " + unityVersion
return unityVersion
}