diff --git a/build.gradle.kts b/build.gradle.kts index 3d77f16..4e1d44e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,6 +29,7 @@ val appVersion = project.version.toString().split("-")[0] val makeAppx = if (os.isWindows) StringUtils.defaultString(System.getenv("MAKEAPPX_PATH")) else StringUtils.EMPTY val isDeb = os.isLinux && System.getenv("TERMORA_TYPE") == "deb" val isAppx = os.isWindows && makeAppx.isNotBlank() && System.getenv("TERMORA_TYPE") == "appx" +val isBeta = project.version.toString().contains("beta", ignoreCase = true) // macOS 签名信息 val macOSSignUsername = System.getenv("TERMORA_MAC_SIGN_USER_NAME") ?: StringUtils.EMPTY @@ -171,10 +172,12 @@ publishing { } tasks.processResources { + val betaVersion = project.version.toString().substringAfterLast('.') filesMatching("**/AppxManifest.xml") { filter( "tokens" to mapOf( "version" to appVersion, + "betaVersion" to if (isBeta) betaVersion else "0", "architecture" to if (arch.isArm64) "arm64" else "x64", "projectDir" to project.projectDir.absolutePath, ) diff --git a/src/main/resources/AppxManifest.xml b/src/main/resources/AppxManifest.xml index f5ae9aa..c8c89f9 100644 --- a/src/main/resources/AppxManifest.xml +++ b/src/main/resources/AppxManifest.xml @@ -6,7 +6,7 @@