mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Fix build when git is not installed
This commit is contained in:
+11
-3
@@ -31,9 +31,17 @@ tasks.register("buildGitChangelog"){
|
|||||||
outputs.file(changelogFile)
|
outputs.file(changelogFile)
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
final def allCommits = providers.exec {
|
final def allCommits
|
||||||
commandLine('git', 'log', '--pretty=format:%h %s')
|
try {
|
||||||
}.standardOutput.asText.get()
|
allCommits = providers.exec {
|
||||||
|
commandLine('git', 'log', '--pretty=format:%h %s')
|
||||||
|
}.standardOutput.asText.get()
|
||||||
|
} catch (ignored) {
|
||||||
|
logger.warn("Skipping git changelog: git is not available")
|
||||||
|
changelogFile.getParentFile().mkdirs()
|
||||||
|
changelogFile.write(groovy.xml.XmlUtil.serialize(new Node(null, 'changelog')))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
def commitVersionCode = getVersionCode()
|
def commitVersionCode = getVersionCode()
|
||||||
def includedCommits = 0
|
def includedCommits = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user