mirror of
https://github.com/lizongying/my-tv.git
synced 2026-10-26 14:16:29 +08:00
fix version name
This commit is contained in:
+2
-2
@@ -71,7 +71,7 @@ android {
|
||||
|
||||
static def VersionCode() {
|
||||
try {
|
||||
def process = 'git rev-list --count HEAD'.execute()
|
||||
def process = "git describe --tags --always | sed 's/v/ /g' | sed 's/\\./ /g' | sed 's/-/ /g' | awk '{print \$1*16777216+\$2*65536+\$3*256+\$4}'".execute()
|
||||
process.waitFor()
|
||||
return process.text.toInteger()
|
||||
} catch (ignored) {
|
||||
@@ -81,7 +81,7 @@ static def VersionCode() {
|
||||
|
||||
static def VersionName() {
|
||||
try {
|
||||
def process = "git describe --tags --always | sed 's/v/ /g' | sed 's/\\./ /g' | sed 's/-/ /g' | awk '{print \$1*16777216+\$2*65536+\$3*256+\$4}'".execute()
|
||||
def process = "git describe --tags --always".execute()
|
||||
process.waitFor()
|
||||
return process.text.trim() - "v"
|
||||
} catch (ignored) {
|
||||
|
||||
Reference in New Issue
Block a user