Jenkins_Pipeline_Library/vars/detectUnityVersion.groovy
2026-03-07 15:07:06 +08:00

19 lines
618 B
Groovy

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