Add branch name to maven artifact

This commit is contained in:
Matthew Messinger 2019-11-30 18:31:58 -05:00
parent b6285fb833
commit d6a3ed0deb
2 changed files with 8 additions and 19 deletions

View file

@ -2,24 +2,16 @@ language: java
jdk:
- openjdk8
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
jobs:
include:
- stage: check
script: ./gradlew check
- stage: publish
script: ./gradlew build publish
on:
branch: master
stages:
- check
- name: check
if: type IN (pull_request)
- name: publish
if: env(ACCESS_KEY)
if: NOT type IN (pull_request)

View file

@ -13,6 +13,10 @@ sourceCompatibility = JavaVersion.VERSION_1_8
version = "${project.minecraft_version}-${project.version}"
if (System.env.TRAVIS_BRANCH != 'master') {
version += "-${System.env.TRAVIS_BRANCH}"
}
if (project.release != 'RELEASE') {
version += "-${project.release}"
}
@ -36,13 +40,6 @@ repositories {
}
}
// check for updates every build when on CI
if (System.env.CI) {
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}"