fixed last derps with automated building

This commit is contained in:
2016-07-20 05:17:05 +02:00
parent 64f19a9741
commit 2ef3bc1dd4
3 changed files with 19 additions and 13 deletions

View File

@@ -12,7 +12,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'com.matthewprenger:CurseGradle:1.0.7' classpath 'gradle.plugin.com.matthewprenger:CurseGradle:1.0.7'
} }
} }
@@ -48,7 +48,7 @@ minecraft {
mappings = "snapshot_20160701" mappings = "snapshot_20160701"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
replace "@VERSION@", project.version replace "${version}", project.version
} }
dependencies { dependencies {
@@ -75,27 +75,27 @@ task buildInfo {
def proc = cmd.execute() def proc = cmd.execute()
proc.waitFor() proc.waitFor()
if (proc.exitValue() == 0) { if (proc.exitValue() == 0) {
ext.tag = proc.text.trim() project.ext.tag = proc.text.trim()
} }
if (System.getenv().BUILD_NUMBER != null) { if (System.getenv().BUILD_NUMBER != null) {
ext.buildNum = System.getenv().BUILD_NUMBER ext.buildNum = System.getenv().BUILD_NUMBER
} }
ext.mc_version = ext.minecraft.version.split('-')[0] project.ext.mc_version = project.minecraft.version.split('-')[0]
def cmd_changes = "git log `git describe --tags \$(git rev-list --tags --max-count=2) | sed -n '2p'`..`git describe --tags --abbrev=0` --oneline" def cmd_changes = "git log `git describe --tags \$(git rev-list --tags --max-count=2) | sed -n '2p'`..`git describe --tags --abbrev=0` --oneline"
def proc_changes = cmd_changes.execute() def proc_changes = cmd_changes.execute()
proc_changes.waitFor() proc_changes.waitFor()
if (proc_changes.exitValue() == 0) { if (proc_changes.exitValue() == 0) {
ext.changes = proc_changes.text.trim() project.ext.changes = proc_changes.text.trim()
} else { } else {
ext.changes = "" project.ext.changes = ""
} }
} }
version = "${mc_version}-${tag}" version = tag ? "${mc_version}-${tag}" : "${mc_version}-snapshot"
//noinspection GroovyAssignabilityCheck //noinspection GroovyAssignabilityCheck
processResources { processResources {
@@ -127,10 +127,16 @@ artifacts {
} }
curseforge { curseforge {
apiKey = System.getenv().CURSE_API_KEY apiKey = System.getenv().CURSE_API_KEY ? System.getenv().CURSE_API_KEY : "devBuild"
project { project {
id = '247661' id = '247661'
changelog = changes // A file can also be set using: changelog = file('changelog.txt') changelog = project.changes // A file can also be set using: changelog = file('changelog.txt')
releaseType = 'release' releaseType = 'release'
mainArtifact(jar) {
displayName = "taiga-$project.tag"
}
} }
} }

View File

@@ -31,7 +31,7 @@ import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
public class TAIGA { public class TAIGA {
public static final String MODID = "taiga"; public static final String MODID = "taiga";
public static final String VERSION = "@VERSION@"; public static final String VERSION = "${version}";
@SidedProxy(clientSide = "com.sosnitzka.taiga.proxy.ClientProxy", serverSide = "com.sosnitzka.taiga.proxy.ServerProxy") @SidedProxy(clientSide = "com.sosnitzka.taiga.proxy.ClientProxy", serverSide = "com.sosnitzka.taiga.proxy.ServerProxy")
public static ServerProxy proxy; public static ServerProxy proxy;

View File

@@ -2,11 +2,11 @@
"modid": "taiga", "modid": "taiga",
"name": "Tinkers Alloying Addon", "name": "Tinkers Alloying Addon",
"description": "An addon for Tinkers' Construct! 32 New Materials including 16 various alloys.", "description": "An addon for Tinkers' Construct! 32 New Materials including 16 various alloys.",
"version": "1.0.1", "version": "${version}",
"mcversion": "1.10.2", "mcversion": "${mcversion}",
"url": "https://github.com/Zkaface/TAIGA", "url": "https://github.com/Zkaface/TAIGA",
"updateUrl": "", "updateUrl": "",
"authorList": ["Zkaface", "chefe4ever"], "authorList": ["Zkaface", "Chefe"],
"credits": "Chefe. He's there, if you need him. Sometimes.", "credits": "Chefe. He's there, if you need him. Sometimes.",
"logoFile": "", "logoFile": "",
"screenshots": [], "screenshots": [],