mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Use modified branch names for APK
This commit is contained in:
parent
c926437a0e
commit
68261c303f
2 changed files with 24 additions and 0 deletions
21
gitutils.gradle
Normal file
21
gitutils.gradle
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
ext.getBuildVersion = { ->
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
|
||||
ext.getBranchName = { ->
|
||||
try {
|
||||
def stdOut = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD'
|
||||
standardOutput = stdOut
|
||||
}
|
||||
return stdOut.toString().trim()
|
||||
} catch (ignored) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue