Fixed Travis

-Changed build.gradle jar file versioning
-Fixed generatePocketSchematics task
-Made Travis use the correct version automatically
-Made Travis publish the sources as well as the binary
This commit is contained in:
Robijnvogel 2018-01-19 10:36:46 +01:00
parent 3d23749f34
commit a936a4280f
2 changed files with 11 additions and 3 deletions

View file

@ -16,12 +16,16 @@ cache:
- "$HOME/.gradle/wrapper/" - "$HOME/.gradle/wrapper/"
sudo: false sudo: false
before_deploy:
- export RELEASE_FILE_LIST=$(ls ./build/libs/* | tr '\n' ', ')
- echo "deploying $RELEASE_FILE_LIST to GitHub releases"
deploy: deploy:
skip_cleanup: true skip_cleanup: true
provider: releases provider: releases
api_key: api_key:
secure: A26twoR4XbarXTCxNIlKr4zbDRw6B+u879+6BWEKmavgAnjhGkPb9PkmR3tPm7iQDp9K9dlkez5KGUJEX/tCMYqL2gQnjlt9BfcVu7YJ4SXhZ6Zcck1/+1jhDox8QHLT2zvgYhmmEWdDD78FHJfO+2+ejhdxDMt6xxVtn47426rs0d0I1L9KDlC8EVoe42c+142Dedk5IaI2GCU07nOKaZFtAnR0NIk/Cf5P7rtecd+jNR3kaAu24U/WPoUMH2cCCf1+ViK/oJgu4FgdEGp1kec0gZnwWqJ+bYvywGiohmbN9B0JsjrwVixYgmzEw00cvdcV8uZHY/RXfOVtDh3ex9xaQYu6Fiq7L8pnw/pN6wsr7kFE0HvhSDAILIAOHFt5jlocAUfjEV/wFQyZUhxZx6Qclx7rdwYt4+iwtB+DPXR71JaaeSLtuQ7Q6HbFxrnjo1biS2ERkdOJobNBHEZvH2A9O1+bx4q9z1+LAP/XXxK2+KpzVZzkDXVUMl81oyAycuipXZQVTyDQdp9XB+waj7xclL57Cibs/DfwOw9l8DKR981h2Q784jBVlJyv/s+vZDgouxLqeTJdsK2cKOuYKl/fMhio6FIJs7p8U7l2OiXbvAg5jY1sJj69ePn7hTiMn2QHVihVM0t3W3/ppp7U0XKo++hB2VXwT/fSS8E5aXs= secure: A26twoR4XbarXTCxNIlKr4zbDRw6B+u879+6BWEKmavgAnjhGkPb9PkmR3tPm7iQDp9K9dlkez5KGUJEX/tCMYqL2gQnjlt9BfcVu7YJ4SXhZ6Zcck1/+1jhDox8QHLT2zvgYhmmEWdDD78FHJfO+2+ejhdxDMt6xxVtn47426rs0d0I1L9KDlC8EVoe42c+142Dedk5IaI2GCU07nOKaZFtAnR0NIk/Cf5P7rtecd+jNR3kaAu24U/WPoUMH2cCCf1+ViK/oJgu4FgdEGp1kec0gZnwWqJ+bYvywGiohmbN9B0JsjrwVixYgmzEw00cvdcV8uZHY/RXfOVtDh3ex9xaQYu6Fiq7L8pnw/pN6wsr7kFE0HvhSDAILIAOHFt5jlocAUfjEV/wFQyZUhxZx6Qclx7rdwYt4+iwtB+DPXR71JaaeSLtuQ7Q6HbFxrnjo1biS2ERkdOJobNBHEZvH2A9O1+bx4q9z1+LAP/XXxK2+KpzVZzkDXVUMl81oyAycuipXZQVTyDQdp9XB+waj7xclL57Cibs/DfwOw9l8DKR981h2Q784jBVlJyv/s+vZDgouxLqeTJdsK2cKOuYKl/fMhio6FIJs7p8U7l2OiXbvAg5jY1sJj69ePn7hTiMn2QHVihVM0t3W3/ppp7U0XKo++hB2VXwT/fSS8E5aXs=
file: ./build/libs/* file_glob: true
file: "{$RELEASE_FILE_LIST}"
on: on:
repo: DimensionalDevelopment/DimDoors repo: DimensionalDevelopment/DimDoors
branch: 1.12-WIP branch: 1.12-WIP

View file

@ -22,7 +22,8 @@ repositories {
// Version info // Version info
String baseversion = "3.0" // Set beta to 0 after changing this String baseversion = "3.0" // Set beta to 0 after changing this
int beta = 5.2 // Set this to 0 for a non-beta release int beta = 5 // Set this to 0 for a non-beta release
int betaSub = 2
ext.mcversion = "1.12.2" ext.mcversion = "1.12.2"
ext.forgeversion = "14.23.1.2598" ext.forgeversion = "14.23.1.2598"
String mcpversion = "snapshot_20180113" String mcpversion = "snapshot_20180113"
@ -31,6 +32,9 @@ String suffix = ""
String shortSuffix = "" String shortSuffix = ""
if (beta != 0) { if (beta != 0) {
suffix += ".$beta" + "-b" suffix += ".$beta" + "-b"
if (betaSub != 0) {
suffix += "-$betaSub"
}
shortSuffix = suffix shortSuffix = suffix
if (System.getenv("TRAVIS_BUILD_NUMBER") != null && beta != 0) { if (System.getenv("TRAVIS_BUILD_NUMBER") != null && beta != 0) {
suffix += "+${System.getenv("TRAVIS_BUILD_NUMBER")}" suffix += "+${System.getenv("TRAVIS_BUILD_NUMBER")}"
@ -91,7 +95,7 @@ processResources {
} }
task generatePocketSchematics(dependsOn: jar, type: JavaExec, group: "dimdoors") { task generatePocketSchematics(dependsOn: jar, type: JavaExec, group: "dimdoors") {
classpath = files('build/libs/dimdoors.jar') classpath = files('build/libs/' + jar.archiveName)
classpath += sourceSets.main.runtimeClasspath classpath += sourceSets.main.runtimeClasspath
main = "org.dimdev.dimdoors.shared.tools.PocketSchematicGenerator" main = "org.dimdev.dimdoors.shared.tools.PocketSchematicGenerator"
//noinspection GroovyAssignabilityCheck (IntelliJ is wrong) //noinspection GroovyAssignabilityCheck (IntelliJ is wrong)