fix(backup): get-latest.sh, search for both .gz and .zstd (#858)

This commit is contained in:
Luigi Operoso
2023-06-25 15:48:36 +02:00
committed by GitHub
parent 3fe842fff4
commit 6cceedba77
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -18,4 +18,4 @@ jobs:
with:
check_filenames: true
ignore_words_list: aks,ags,startin
skip: "*.js,package-lock.json,*.lock,*/Font-Awesome/*,*.toml,*.svg,*assets/vendor/bootstrap*"
skip: "*.js,package-lock.json,*.lock,*/Font-Awesome/*,*.toml,*.svg,*assets/vendor/bootstrap*,cert-manager.crds.yaml"
+2 -2
View File
@@ -3,8 +3,8 @@
set -eo pipefail
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1
latest=$(find ${BACKUP_DIR} -name '*.tar.zstd' -exec basename {} \; | sort -g | tail -n 1)
# Search for all the tar.* inside the backup dir to support the migration between gzip vs zstd
latest=$(find ${BACKUP_DIR} -name '*.tar.*' -exec basename {} \; | sort -g | tail -n 1)
if [[ "${latest}" == "" ]]; then
echo "-1"