mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 05:48:00 +01:00
Add branch name to maven artifact
This commit is contained in:
parent
b6285fb833
commit
d6a3ed0deb
2 changed files with 8 additions and 19 deletions
16
.travis.yml
16
.travis.yml
|
@ -2,24 +2,16 @@ language: java
|
||||||
jdk:
|
jdk:
|
||||||
- openjdk8
|
- 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:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: check
|
- stage: check
|
||||||
script: ./gradlew check
|
script: ./gradlew check
|
||||||
- stage: publish
|
- stage: publish
|
||||||
script: ./gradlew build publish
|
script: ./gradlew build publish
|
||||||
on:
|
|
||||||
branch: master
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- check
|
- name: check
|
||||||
|
if: type IN (pull_request)
|
||||||
- name: publish
|
- name: publish
|
||||||
if: env(ACCESS_KEY)
|
if: NOT type IN (pull_request)
|
||||||
|
|
||||||
|
|
11
build.gradle
11
build.gradle
|
@ -13,6 +13,10 @@ sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
version = "${project.minecraft_version}-${project.version}"
|
version = "${project.minecraft_version}-${project.version}"
|
||||||
|
|
||||||
|
if (System.env.TRAVIS_BRANCH != 'master') {
|
||||||
|
version += "-${System.env.TRAVIS_BRANCH}"
|
||||||
|
}
|
||||||
|
|
||||||
if (project.release != 'RELEASE') {
|
if (project.release != 'RELEASE') {
|
||||||
version += "-${project.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 {
|
dependencies {
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
|
||||||
|
|
Loading…
Reference in a new issue