update versioning

This commit is contained in:
Progwml6 committed 2013-12-05 16:34:01 -05:00
1 parent 6dd171c27a
commit aa4ac3f310
3 files changed
+38 -12

No files matched your search

+2
View File
@@ -21,3 +21,5 @@ Thumbs.db
/*.iws
#Vim backups
*~
#manual version override
version.properties
+35 -11
View File
@@ -44,7 +44,6 @@ repositories {
apply plugin: 'forge'
// define the properties file
ext.configFile = file "build.properties"
@@ -54,6 +53,21 @@ configFile.withReader {
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
ext.artifact_version_override = 'NotUsed'
//gitignored config file -- if this has the entry for override it will override the version for local builds
//create a file called version.properties with the line artifact_version_override=NotUsed
//replace not used w/ version #'s for manual local overrides
ext.configFile2 = file "version.properties"
if (configFile2.exists()){
configFile2.withReader {
def prop2 = new Properties()
prop2.load(it)
ext.GIVersionFL = new ConfigSlurper().parse prop2
if (GIVersionFL != null){
project.artifact_version_override = GIVersionFL.artifact_version_override
}
}
}
dependencies {
compile "mantle:Mantle:${config.mantle_version}:dev"
@@ -63,12 +77,7 @@ dependencies {
}
minecraft {
version = config.minecraft_version + "-" + config.forge_version
assetDir = 'run/assets'
}
// sets version to the slimeKnights version format
// sets version to the slimeKnights default version format
task buildInfo {
def cmd = "git rev-parse --short HEAD"
def proc = cmd.execute()
@@ -85,7 +94,24 @@ task buildInfo {
ext.buildNum = "DEV"
}
}
version = "${minecraft.version}-${project.buildInfo.buildNum}.${project.buildInfo.revision}"
ext.artifact_version = 'NFG'
if (System.getenv().ARTIFACT_VERSION == null && artifact_version_override == 'NotUsed') {
artifact_version = "${project.buildInfo.buildNum}.${project.buildInfo.revision}"
}
if (System.getenv().ARTIFACT_VERSION != null && artifact_version_override == 'NotUsed') {
artifact_version = "${system.getenv().ARTIFACT_VERSION}"
}
if (artifact_version_override != 'NotUsed') {
artifact_version = "${artifact_version_override}"
}
version = "${config.minecraft_version}-${artifact_version}"
minecraft {
version = config.minecraft_version + "-" + config.forge_version
assetDir = 'run/assets'
replace '${version}', project.version
}
sourceSets {
main {
@@ -99,9 +125,8 @@ processResources
// replace stuff in text files, not binary ones.
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
// replace version and MCVersion
expand 'version':project.version, 'mcversion':project.minecraft.version
expand 'version':artifact_version,'MCversion':config.minecraft_version
}
// copy everything else, thats not text
@@ -110,7 +135,6 @@ processResources
}
}
jar {
manifest {
attributes 'FMLCorePlugin': 'tconstruct.preloader.TConstructLoaderContainer'
+1 -1
View File
@@ -32,7 +32,7 @@ import tconstruct.worldgen.village.*;
* @author mDiyo
*/
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.6.X_2.0a",
@Mod(modid = "TConstruct", name = "TConstruct", version = "${version}",
dependencies = "required-after:Forge@[8.9,);required-after:Mantle;after:ForgeMultipart;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = tconstruct.util.network.TPacketHandler.class)
public class TConstruct