mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-21 20:18:01 +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:
|
||||
- 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)
|
||||
|
||||
|
|
11
build.gradle
11
build.gradle
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue