update script to pull latest version

This commit is contained in:
josh 2021-09-19 19:48:47 -05:00
parent 880fe20833
commit 75907e302e
3 changed files with 6 additions and 6 deletions

View file

@ -1,9 +1,8 @@
FROM alpine:latest FROM alpine:latest
ENV VERSION 0.3.5
ENV PUID=1000 PGID=1000 ENV PUID=1000 PGID=1000
RUN apk --update add --no-cache openjdk11-jre RUN apk --update add --no-cache openjdk11-jre grep curl
RUN mkdir /app RUN mkdir /app
RUN mkdir /config RUN mkdir /config

View file

@ -2,7 +2,6 @@
docker container for [JMusicBot](https://github.com/jagrosh/MusicBot) docker container for [JMusicBot](https://github.com/jagrosh/MusicBot)
## Usage ## Usage
[JMusicBot](https://github.com/jagrosh/MusicBot)
### Docker ### Docker
Usage: `docker run -it -v yourpath/toconfig:/config yojoshb/jmusicbot:latest` Usage: `docker run -it -v yourpath/toconfig:/config yojoshb/jmusicbot:latest`

View file

@ -2,8 +2,10 @@
echo "Starting JMusicBot" echo "Starting JMusicBot"
if [ ! -f JMusicBot-${VERSION}.jar ]; then VER=$(curl --silent "https://api.github.com/repos/jagrosh/MusicBot/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
wget https://github.com/jagrosh/MusicBot/releases/download/${VERSION}/JMusicBot-${VERSION}.jar
if [ ! -f JMusicBot-$VER.jar ]; then
wget https://github.com/jagrosh/MusicBot/releases/download/$VER/JMusicBot-$VER.jar
fi fi
java -Dnogui=true -Dconfig=/config/config.txt -jar JMusicBot-${VERSION}.jar java -Dnogui=true -Dconfig=/config/config.txt -jar JMusicBot-$VER.jar