Skip to content
This repository was archived by the owner on Jun 20, 2021. It is now read-only.

Commit 7baeb0b

Browse files
committed
Manage version with one variable
1 parent 70bf4f9 commit 7baeb0b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from debian:sid
22
env DEBIAN_FRONTEND noninteractive
3+
env MINECRAFT_VERSION=1.12.2
34
run sed -e 's/deb.debian.org/debian.mirrors.ovh.net/g' -i /etc/apt/sources.list
45
run apt-get update && \
56
apt-get dist-upgrade -y && \
@@ -10,7 +11,7 @@ run apt-get update && \
1011
# Spigot (Minecraft server)
1112
add https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar /opt/minecraft/BuildTools.jar
1213
workdir /opt/minecraft/
13-
run java -jar BuildTools.jar --rev 1.12.2 .
14+
run java -jar BuildTools.jar --rev $MINECRAFT_VERSION .
1415

1516
add http://scriptcraftjs.org/download/latest/scriptcraft-3.2.1/scriptcraft.jar /opt/minecraft/plugins/scriptcraft.jar
1617

start

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ cd /minecraft
1111
[ -n "${ONLINE_MODE:-}" ] && sed -i -e "s/^online-mode=.*/online-mode=$ONLINE_MODE/g" /minecraft/server.properties
1212

1313
/etc/init.d/ssh start
14-
echo "jsp classroom on" | /usr/bin/java -Xmx8192M -jar spigot-1.11.2.jar
14+
echo "jsp classroom on" | /usr/bin/java -Xmx8192M -jar spigot-${MINECRAFT_VERSION}.jar

0 commit comments

Comments
 (0)