chore: 修改版本号格式

This commit is contained in:
HuanChengFly 2020-08-22 11:19:36 +08:00
parent bb91694edb
commit ef0b185bdd
2 changed files with 6 additions and 5 deletions

View File

@ -23,12 +23,12 @@ applicationProperties.load(new FileInputStream(rootProject.file("application.pro
def SHA1 = System.getenv("CIRCLE_SHA1")
def applicationVersionCode = applicationProperties["versionCode"].toInteger()
def applicationVersionName = applicationProperties["versionName"]
def isPerVersion = applicationProperties["isPerVersion"] == "true"
def isPerVersion = applicationProperties["isPerRelease"] == "true"
if (SHA1 != null) {
applicationVersionName = applicationVersionName + ".${SHA1.substring(0, 8)}"
applicationVersionName = applicationVersionName + ".${SHA1.substring(0, 7)}"
}
if (isPerVersion) {
applicationVersionName = applicationVersionName + "-${applicationProperties["perVersion"]}"
applicationVersionName = applicationVersionName + ".${applicationProperties["preReleaseName"]}-${applicationProperties["preReleaseVer"]}"
}
andResGuard {

View File

@ -1,4 +1,5 @@
versionCode=38201
versionName=3.8.3
isPerVersion=true
perVersion=beta1
isPerRelease=true
preReleaseName=beta
preReleaseVer=2