Fix ciWriteBuildNumber task. Ugly, but it works.
This commit is contained in:
parent
b211aca5ce
commit
bbe96a3577
1 changed files with 15 additions and 0 deletions
15
build.gradle
15
build.gradle
|
@ -209,6 +209,21 @@ artifacts {
|
|||
archives makeMdk
|
||||
}
|
||||
|
||||
task ciWriteBuildNumber << {
|
||||
def file = file("src/main/java/net/minecraftforge/common/ForgeVersion.java");
|
||||
def bn = System.getenv("BUILD_NUMBER")?:0;
|
||||
def outfile = "";
|
||||
def ln = System.getProperty('line.separator')
|
||||
|
||||
file.eachLine{ String s ->
|
||||
if (s.contains("buildVersion") && s.contains("= 0;")) {
|
||||
s = " public static final int buildVersion = ${bn};";
|
||||
}
|
||||
outfile += (s+ln);
|
||||
}
|
||||
file.write(outfile);
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories.mavenDeployer {
|
||||
|
||||
|
|
Loading…
Reference in a new issue