mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-12 02:10:30 +00:00
Various improvements to credits generation
- Include author and comitter (so includes rebased commits) - Ignore case when sorting names Fixes #356
This commit is contained in:
parent
1d63598d43
commit
48754659f8
10
build.gradle
10
build.gradle
@ -78,21 +78,23 @@ processResources {
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
def grgit = Grgit.open(dir: '.')
|
||||
inputs.property "commithash", grgit.log(maxCommits: 1)[0].id
|
||||
inputs.property "commithash", grgit.head().id
|
||||
|
||||
def blacklist = ['GitHub', 'dan200', 'Daniel Ratcliffe']
|
||||
Set<String> contributors = []
|
||||
|
||||
grgit.log().each {
|
||||
if (!blacklist.contains(it.committer.name))
|
||||
contributors.add(it.committer.name)
|
||||
if (!blacklist.contains(it.author.name)) contributors.add(it.author.name)
|
||||
if (!blacklist.contains(it.committer.name)) contributors.add(it.committer.name)
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
include 'assets/computercraft/lua/rom/help/credits.txt'
|
||||
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version, 'gitcontributors':contributors.sort().join('\n')
|
||||
expand 'version':project.version,
|
||||
'mcversion':project.minecraft.version,
|
||||
'gitcontributors':contributors.sort(false, String.CASE_INSENSITIVE_ORDER).join('\n')
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
|
Loading…
Reference in New Issue
Block a user