mirror of
https://github.com/lizongying/my-tv.git
synced 2026-10-26 22:26:29 +08:00
fix version name
This commit is contained in:
+2
-2
@@ -71,7 +71,7 @@ android {
|
|||||||
|
|
||||||
static def VersionCode() {
|
static def VersionCode() {
|
||||||
try {
|
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()
|
process.waitFor()
|
||||||
return process.text.toInteger()
|
return process.text.toInteger()
|
||||||
} catch (ignored) {
|
} catch (ignored) {
|
||||||
@@ -81,7 +81,7 @@ static def VersionCode() {
|
|||||||
|
|
||||||
static def VersionName() {
|
static def VersionName() {
|
||||||
try {
|
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()
|
process.waitFor()
|
||||||
return process.text.trim() - "v"
|
return process.text.trim() - "v"
|
||||||
} catch (ignored) {
|
} catch (ignored) {
|
||||||
|
|||||||
Reference in New Issue
Block a user