diff --git a/Dockerfile b/Dockerfile index f29dadc..0adb8cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN install_packages openjdk-11-jre-headless wget curl grep \ STOPSIGNAL SIGTERM ENV BOT_VERSION latest +ENV BOT_REPO jagrosh/MusicBot COPY run_bot.sh /app/run_bot.sh RUN chmod +x /app/run_bot.sh diff --git a/run_bot.sh b/run_bot.sh index 506da12..0a66991 100644 --- a/run_bot.sh +++ b/run_bot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the default version to latest -VER_DEFAULT=$(curl --silent "https://api.github.com/repos/jagrosh/MusicBot/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') +VER_DEFAULT=$(curl --silent "https://api.github.com/repos/$BOT_REPO/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') # If the ENV is not explicitly set, use the sourced ENV from the Dockerfile if [ $BOT_VERSION == "latest" ]; then @@ -10,7 +10,7 @@ fi echo -e "Downloading JMusicBot $BOT_VERSION" if [ ! -f JMusicBot-$BOT_VERSION.jar ]; then - wget https://github.com/jagrosh/MusicBot/releases/download/$BOT_VERSION/JMusicBot-$BOT_VERSION.jar + wget https://github.com/$BOT_REPO/releases/download/$BOT_VERSION/JMusicBot-$BOT_VERSION.jar fi echo -e "Starting JMusicBot $BOT_VERSION"