mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
* Added try-catch block in getBuildVersion function in gitutils.gradle file. * Formatting fix * Add comment
This commit is contained in:
parent
bedc53b0ca
commit
7b2f7191f5
1 changed files with 10 additions and 5 deletions
|
|
@ -1,10 +1,15 @@
|
||||||
ext.getBuildVersion = { ->
|
ext.getBuildVersion = { ->
|
||||||
|
// Short-term fix for #1157. Should ideally look into why method is failing.
|
||||||
|
try {
|
||||||
def stdout = new ByteArrayOutputStream()
|
def stdout = new ByteArrayOutputStream()
|
||||||
exec {
|
exec {
|
||||||
commandLine 'git' , 'rev-parse' , '--short' , 'HEAD'
|
commandLine 'git' , 'rev-parse' , '--short' , 'HEAD'
|
||||||
standardOutput = stdout
|
standardOutput = stdout
|
||||||
}
|
}
|
||||||
return stdout.toString().trim()
|
return stdout.toString().trim()
|
||||||
|
} catch (ignored) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.getBranchName = { ->
|
ext.getBranchName = { ->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue