made repo configurable
This commit is contained in:
parent
06393c9d39
commit
f32494d624
2 changed files with 3 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ RUN install_packages openjdk-11-jre-headless wget curl grep \
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
ENV BOT_VERSION latest
|
ENV BOT_VERSION latest
|
||||||
|
ENV BOT_REPO jagrosh/MusicBot
|
||||||
|
|
||||||
COPY run_bot.sh /app/run_bot.sh
|
COPY run_bot.sh /app/run_bot.sh
|
||||||
RUN chmod +x /app/run_bot.sh
|
RUN chmod +x /app/run_bot.sh
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Set the default version to latest
|
# 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 the ENV is not explicitly set, use the sourced ENV from the Dockerfile
|
||||||
if [ $BOT_VERSION == "latest" ]; then
|
if [ $BOT_VERSION == "latest" ]; then
|
||||||
|
|
@ -10,7 +10,7 @@ fi
|
||||||
|
|
||||||
echo -e "Downloading JMusicBot $BOT_VERSION"
|
echo -e "Downloading JMusicBot $BOT_VERSION"
|
||||||
if [ ! -f JMusicBot-$BOT_VERSION.jar ]; then
|
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
|
fi
|
||||||
|
|
||||||
echo -e "Starting JMusicBot $BOT_VERSION"
|
echo -e "Starting JMusicBot $BOT_VERSION"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue