mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 01:55:50 +01:00
Reduce number of git commits on nightly changelog
- Include last 100 commits - Ignore weblate commits The changelog_git is still being accidentally included into release builds. It currently takes 6kb compressed.
This commit is contained in:
parent
294d45f6c3
commit
f6ff357a6b
@ -36,12 +36,22 @@ def buildGitChangelog = {
|
||||
}
|
||||
|
||||
def commitVersionCode = getVersionCode()
|
||||
def includedCommits = 0
|
||||
def changelogNode = new Node(null, 'changelog')
|
||||
|
||||
stdout.toString().trim().eachLine { line ->
|
||||
if (includedCommits > 100) {
|
||||
return true;
|
||||
}
|
||||
|
||||
def (commitHash, commitMessage) = line.split(" ", 2)
|
||||
if (commitMessage.contains("Translated using Weblate")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
def releaseNode = new Node(changelogNode, 'release', [version: commitHash, versioncode: commitVersionCode--])
|
||||
def _ = new Node(releaseNode, 'change', [:], commitMessage)
|
||||
includedCommits++
|
||||
}
|
||||
|
||||
def changelogFile = new File("${project.rootDir}/app/build/generated/res/changelog/xml/changelog_git.xml")
|
||||
|
Loading…
Reference in New Issue
Block a user