Skip to content

Commit

Permalink
Bump keepup to 2.0, allow using KEEPUP_JSON_PATH env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Feb 12, 2024
1 parent 7f0ea20 commit dc5ee7a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions minecraft.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL org.opencontainers.image.authors="Offz <[email protected]>"

RUN apk add --no-cache ansible rclone wget unzip jq

ARG KEEPUP_VERSION=1.2.2
ARG KEEPUP_VERSION=2.0.0-beta.1

ENV\
KEEPUP=true\
Expand All @@ -27,7 +27,7 @@ RUN wget https://www.yourkit.com/download/docker/YourKit-JavaProfiler-2023.9-doc
rm /tmp/YourKit-JavaProfiler-2023.9-docker.zip

# Install keepup
RUN wget -nv -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-${KEEPUP_VERSION}.zip \
RUN wget -nv -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-shadow-${KEEPUP_VERSION}.zip \
# unzip file inside hocon-to-json.zip into /usr/local \
&& unzip -q keepup.zip \
&& rclone copy keepup-${KEEPUP_VERSION}/ /usr/local \
Expand Down
4 changes: 2 additions & 2 deletions proxy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update -y \

RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install --include-deps ansible

ARG KEEPUP_VERSION=1.2.2
ARG KEEPUP_VERSION=2.0.0-beta.1

ENV\
KEEPUP=true\
Expand All @@ -25,7 +25,7 @@ ENV\
WORKDIR /opt/minecraft

# Install keepup
RUN wget -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-${KEEPUP_VERSION}.zip \
RUN wget -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/download/v${KEEPUP_VERSION}/keepup-shadow-${KEEPUP_VERSION}.zip \
# unzip file inside hocon-to-json.zip into /usr/local \
&& unzip keepup.zip \
&& rclone copy keepup-${KEEPUP_VERSION}/ /usr/local \
Expand Down
9 changes: 7 additions & 2 deletions scripts/dev/keepup
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ if [ "$KEEPUP" = "true" ]; then
return
fi


if [ -z "$KEEPUP_JSON_PATH" ]; then
export KEEPUP_JSON_PATH=mineinabyss.servers.${SERVER_NAME}
fi

echo "Running keepup with overrides"
cat $pluginVersionsFile $keepupOverridesFile 2>/dev/null\
| keepup - $keepupDownloadsDir $pluginsDir --json-path=mineinabyss.servers.${SERVER_NAME}
| keepup - $keepupDownloadsDir $pluginsDir
else
echo "Running keepup without overrides"
keepup $pluginVersionsFile\
$keepupDownloadsDir $pluginsDir --json-path=mineinabyss.servers.${SERVER_NAME}
$keepupDownloadsDir $pluginsDir
fi
else
echo "KEEPUP is not set to 'true', not running keepup"
Expand Down

0 comments on commit dc5ee7a

Please sign in to comment.