Fixed command name
This commit is contained in:
parent
9a1f3dc1c1
commit
6ffd8075ea
34
build.sh
34
build.sh
|
@ -1,26 +1,22 @@
|
||||||
git fetch
|
git fetch
|
||||||
curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar --output BuildTools.jar
|
curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar --output BuildTools.jar
|
||||||
|
|
||||||
if [ -z "$(git status --porcelain)" ]; then
|
|
||||||
if [ -z "$(git log HEAD..origin/master --oneline)" ]; then
|
if [ -z "$(git log HEAD..origin/master --oneline)" ]; then
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Usage: build.sh <version>"
|
echo "Usage: build.sh <version>"
|
||||||
else
|
|
||||||
if [ -d "$1" ]; then
|
|
||||||
rm -fr "$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir "$1"
|
|
||||||
cd "$1"
|
|
||||||
Java -jar ../BuildTools.jar --rev "$1"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "It looks like there are incomming updates to this repository. Pulling those changes now."
|
if [ -d "$1" ]; then
|
||||||
git pull
|
rm -fr "$1"
|
||||||
echo "This repositry has been updated. That means that this script might also have been updated. This script will now exit to ensure that the newest version is used."
|
fi
|
||||||
echo "IMPORTANT: Please re-run this script."
|
|
||||||
|
mkdir "$1"
|
||||||
|
cd "$1"
|
||||||
|
java -jar ../BuildTools.jar --rev "$1"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "It looks like you have made changes to this repository."
|
echo "It looks like there are incomming updates to this repository. Pulling those changes now."
|
||||||
echo "Please remove those changes and re-run this script."
|
git pull
|
||||||
|
echo "This repositry has been updated. That means that this script might also have been updated. This script will now exit to ensure that the newest version is used."
|
||||||
|
echo "IMPORTANT: Please re-run this script."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue