Travis NMS Build Test

This commit is contained in:
jameslfc19 2020-07-04 02:03:53 +01:00
parent daf23d3f5d
commit a1fc3a04c7
2 changed files with 39 additions and 0 deletions

View File

@ -1,9 +1,16 @@
language: java
script:
- cd /BuildTools
- bash build.sh
- cd ../
- mvn -DskipTests package
- export FOO=$(ls /Server/plugins/ChestsPlusPlus-*.jar)
cache:
directories:
- $HOME/.m2
deploy:
provider: releases
skip_cleanup: true

32
BuildTools/build.sh Normal file
View File

@ -0,0 +1,32 @@
#!/bin/sh
echo "Checking BuildTools cache"
curl -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
#Local Maven Repo
MAVEN_DIR="$HOME/.m2"
#CraftBukkit in local repo
CRAFTBUKKIT="${MAVEN_DIR}/repository/org/bukkit/craftbukkit"
#Versions
#VERSION_1_16="1.16.1"
VERSION_1_15="1.15.2"
#VERSION_1_14="1.14.4"
#array=("${VERSION_1_16}" "${VERSION_1_15}" "${VERSION_1_14}")
array=("${VERSION_1_15}")
for i in "${array[@]}"
do
VERSION_DIR="${CRAFTBUKKIT}/${i}-R0.1-SNAPSHOT"
if [ -d "$VERSION_DIR" ]; then
echo "${i} is cached!"
else
echo "${i} isn't cached!"
echo "Running BuildTools!"
java -jar BuildTools.jar --rev ${i} --compile craftbukkit > /dev/null 2>&1
echo "Compiled CraftBukkit ${i}"
fi
done