chore: improve subversion

This commit is contained in:
hstyi
2025-08-07 11:28:19 +08:00
committed by hstyi
parent 176fa64de0
commit 7c0cbab187
2 changed files with 4 additions and 1 deletions

View File

@@ -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 makeAppx = if (os.isWindows) StringUtils.defaultString(System.getenv("MAKEAPPX_PATH")) else StringUtils.EMPTY
val isDeb = os.isLinux && System.getenv("TERMORA_TYPE") == "deb" val isDeb = os.isLinux && System.getenv("TERMORA_TYPE") == "deb"
val isAppx = os.isWindows && makeAppx.isNotBlank() && System.getenv("TERMORA_TYPE") == "appx" val isAppx = os.isWindows && makeAppx.isNotBlank() && System.getenv("TERMORA_TYPE") == "appx"
val isBeta = project.version.toString().contains("beta", ignoreCase = true)
// macOS 签名信息 // macOS 签名信息
val macOSSignUsername = System.getenv("TERMORA_MAC_SIGN_USER_NAME") ?: StringUtils.EMPTY val macOSSignUsername = System.getenv("TERMORA_MAC_SIGN_USER_NAME") ?: StringUtils.EMPTY
@@ -171,10 +172,12 @@ publishing {
} }
tasks.processResources { tasks.processResources {
val betaVersion = project.version.toString().substringAfterLast('.')
filesMatching("**/AppxManifest.xml") { filesMatching("**/AppxManifest.xml") {
filter<ReplaceTokens>( filter<ReplaceTokens>(
"tokens" to mapOf( "tokens" to mapOf(
"version" to appVersion, "version" to appVersion,
"betaVersion" to if (isBeta) betaVersion else "0",
"architecture" to if (arch.isArm64) "arm64" else "x64", "architecture" to if (arch.isArm64) "arm64" else "x64",
"projectDir" to project.projectDir.absolutePath, "projectDir" to project.projectDir.absolutePath,
) )

View File

@@ -6,7 +6,7 @@
<Identity Name="TermoraDev.Termora" <Identity Name="TermoraDev.Termora"
Publisher="CN=C804E131-4368-4BF7-9E7F-95C681AD0AAC" Publisher="CN=C804E131-4368-4BF7-9E7F-95C681AD0AAC"
Version="@version@.0" Version="@version@.@betaVersion@"
ProcessorArchitecture="@architecture@"/> ProcessorArchitecture="@architecture@"/>
<Properties> <Properties>