Improved upgrade handling by moving aside behavior_packs, etc

This commit is contained in:
Geoff Bourne committed 2020-06-24 17:53:51 -05:00
1 parent 9fe9eb34bd
commit e045ca647c
2 files changed
+13 -2

No files matched your search

+1 -1
View File
@@ -141,4 +141,4 @@ You can follow the logs of the deployment using:
```bash ```bash
kubectl logs -f deployment/bds kubectl logs -f deployment/bds
``` ```
+12 -1
View File
@@ -59,7 +59,18 @@ if [ ! -f "bedrock_server-${VERSION}" ]; then
curl -o ${TMP_ZIP} -fsSL ${DOWNLOAD_URL} curl -o ${TMP_ZIP} -fsSL ${DOWNLOAD_URL}
# remove only binaries and some docs, to allow for an upgrade of those # remove only binaries and some docs, to allow for an upgrade of those
rm -f bedrock_server *.so release-notes.txt bedrock_server_how_to.html 2> /dev/null rm -rf bedrock_server *.so release-notes.txt bedrock_server_how_to.html valid_known_packs.json premium_cache 2> /dev/null
bkupDir=backup-pre-${VERSION}
for d in behavior_packs definitions minecraftpe resource_packs structures treatments world_templates
do
if [ -d $d ]; then
mkdir -p $bkupDir
echo "Backing up $d into $bkupDir"
mv $d $bkupDir
fi
done
# ... use -n to avoid overwriting any existing files with the archive's copy # ... use -n to avoid overwriting any existing files with the archive's copy
unzip -n -q ${TMP_ZIP} unzip -n -q ${TMP_ZIP}
rm ${TMP_ZIP} rm ${TMP_ZIP}