Auto-merging via docker-versions-create

This commit is contained in:
Geoff Bourne
2020-02-01 08:52:51 -06:00
5 changed files with 30 additions and 9 deletions
+9 -6
View File
@@ -15,12 +15,9 @@ RUN apk add --no-cache -U \
mysql-client \ mysql-client \
tzdata \ tzdata \
rsync \ rsync \
nano \ nano
python python-dev py2-pip
RUN pip install mcstatus yq HEALTHCHECK --start-period=1m CMD mc-monitor status --host localhost --port $SERVER_PORT
HEALTHCHECK --start-period=1m CMD mcstatus localhost:$SERVER_PORT ping
RUN addgroup -g 1000 minecraft \ RUN addgroup -g 1000 minecraft \
&& adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft \ && adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft \
@@ -41,11 +38,17 @@ RUN easy-add --file restify --from https://github.com/itzg/restify/releases/down
ARG RCON_CLI_VER=1.4.7 ARG RCON_CLI_VER=1.4.7
RUN easy-add --file rcon-cli --from https://github.com/itzg/rcon-cli/releases/download/${RCON_CLI_VER}/rcon-cli_${RCON_CLI_VER}_linux_${ARCH}.tar.gz RUN easy-add --file rcon-cli --from https://github.com/itzg/rcon-cli/releases/download/${RCON_CLI_VER}/rcon-cli_${RCON_CLI_VER}_linux_${ARCH}.tar.gz
ARG MC_MONITOR_VER=0.1.6
RUN easy-add --file mc-monitor --from https://github.com/itzg/mc-monitor/releases/download/v${MC_MONITOR_VER}/mc-monitor_${MC_MONITOR_VER}_Linux_${ARCH}.tar.gz
ARG MC_RUN_VER=1.3.3 ARG MC_RUN_VER=1.3.3
RUN easy-add --file mc-server-runner --from https://github.com/itzg/mc-server-runner/releases/download/${MC_RUN_VER}/mc-server-runner_${MC_RUN_VER}_linux_${ARCH}.tar.gz RUN easy-add --file mc-server-runner --from https://github.com/itzg/mc-server-runner/releases/download/${MC_RUN_VER}/mc-server-runner_${MC_RUN_VER}_linux_${ARCH}.tar.gz
ARG MVN_META_REL_VER=0.1.0
RUN easy-add --file maven-metadata-release --from https://github.com/itzg/maven-metadata-release/releases/download/v${MVN_META_REL_VER}/maven-metadata-release_${MVN_META_REL_VER}_linux_${ARCH}.tar.gz
COPY mcadmin.jq /usr/share COPY mcadmin.jq /usr/share
RUN chmod +x /usr/local/bin/* COPY mcstatus /usr/local/bin
VOLUME ["/data","/mods","/config"] VOLUME ["/data","/mods","/config"]
COPY server.properties /tmp/server.properties COPY server.properties /tmp/server.properties
+3
View File
@@ -47,6 +47,9 @@ for branch in "${branches_list[@]}"; do
exit 1; } exit 1; }
proceed='False' proceed='False'
while [[ "$proceed" == "False" ]]; do while [[ "$proceed" == "False" ]]; do
# Ensure local branch is aligned with remote since docker-versions-create may have been run elsewhere
git pull
if git merge -m 'Auto-merging via docker-versions-create' master; then if git merge -m 'Auto-merging via docker-versions-create' master; then
proceed="True" proceed="True"
echo "Branch $branch updated to current master successfully" echo "Branch $branch updated to current master successfully"
Executable
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
##### mcstatus shim for mc-monitor
# handles translating calls to
# mcstatus (host:port) (command)
# where the actual command is ignore, but is typically ping or status
addr="$1"
IFS=':'
read -a parts <<< "${addr}"
if [[ ${#parts[*]} -gt 1 ]]; then
exec mc-monitor status --host ${parts[0]} --port ${parts[1]}
else
exec mc-monitor status --host ${parts[0]}
fi
+1 -2
View File
@@ -12,8 +12,7 @@ if [[ -z $FABRIC_INSTALLER && -z $FABRIC_INSTALLER_URL ]]; then
echo "Checking Fabric version information." echo "Checking Fabric version information."
case $FABRICVERSION in case $FABRICVERSION in
LATEST) LATEST)
curl -fsSL https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml | xq -c . > /tmp/fabric.json FABRIC_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml)
FABRIC_VERSION=$(< /tmp/fabric.json jq -r ".metadata.versioning.release")
;; ;;
*) *)
+1 -1
View File
@@ -31,7 +31,7 @@ fi
echo "Checking for JSON files." echo "Checking for JSON files."
JSON_FILES=$(find . -maxdepth 1 -name '*.json') JSON_FILES=$(find . -maxdepth 1 -name '*.json')
for j in $JSON_FILES; do for j in $JSON_FILES; do
if [[ $(python -c "print open('$j').read().strip()==''") = True ]]; then if [[ $(cat $j | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') == "" ]]; then
echo "Fixing JSON $j" echo "Fixing JSON $j"
echo '[]' > $j echo '[]' > $j
fi fi