Some fixes for Raspberry Pi.

This commit is contained in:
2014-12-28 01:55:17 +04:00
parent a4b86a7df5
commit 277ae712f2
3 changed files with 3 additions and 2 deletions

View File

@@ -7,17 +7,18 @@ task createVersionXML {
doLast {
def versionP = 'git describe --tags --long --dirty=-x --abbrev=8'
.execute()
versionP.waitFor()
def version = versionP.text.trim()
if ( versionP.exitValue() )
throw new GradleException("Couldn't extract version. Git exited unexpectedly.")
def githashP = 'git rev-parse HEAD'.execute()
githashP.waitFor()
def githash = githashP.text.trim()
if ( githashP.exitValue() )
throw new GradleException("Couldn't extract git_hash. Git exited unexpectedly.")
def builddate = new Date()
def versionFile = new FileWriter("app/src/main/res/values/version.xml")
versionFile.println( '<?xml version="1.0" encoding="utf-8"?>' )
versionFile.println( '<resources>' )