diff --git a/deploy.sh b/deploy.sh index e1a7de9..3271226 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,19 +1,22 @@ -!#bin/bash +#!/bin/bash BUILD_DIR="/root" -# move sludge.db sqlite file -mv $BUILD_DIR/build/sludge.db $BUILD_DIR/sludge.db + +# find newest zip file and extract version +NEWEST_ZIP="$(find "$BUILD_DIR" -maxdepth 1 -name "*.zip" -type f -printf '%T@ %p\n' | sort -rn | head -n 1 | cut -d' ' -f2)" +VERSION="$(basename -s .zip "$NEWEST_ZIP" | cut -d' ' -f2)" + +# move sludge.db sqlite file with versioned backup name +cp "$BUILD_DIR/build/sludge.db" "$BUILD_DIR/sludge.db.$VERSION" # remove build folder -rm -rf $BUILD_DIR/build/ +rm -rf "$BUILD_DIR/build/" -# remove old build zip -rm -- "$(ls -rt $BUILD_DIR/*.zip | head -n 1)" - -# unzip new build zip -unzip *.zip +# unzip newest zip file +unzip "$NEWEST_ZIP" # move db file back -mv $BUILD_DIR/sludge.db $BUILD_DIR/build/sludge.db +cp "$BUILD_DIR/sludge.db.$VERSION" "$BUILD_DIR/build/sludge.db" # restart sludge webserver -sudo systemctl restart sludge-info \ No newline at end of file +sudo systemctl restart sludge-info + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index af59099..384ef68 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -151,7 +151,7 @@ margin-right: auto; } &:hover { - color: var(--primary-8); + color: var(--primary-3); } } button { diff --git a/src/routes/fest/clicker/+page.svelte b/src/routes/fest/clicker/+page.svelte index 8e8d363..e4af62c 100644 --- a/src/routes/fest/clicker/+page.svelte +++ b/src/routes/fest/clicker/+page.svelte @@ -56,12 +56,12 @@