fix(backup): get-latest.sh, search for both .gz and .zstd (#858)
This commit is contained in:
parent
3fe842fff4
commit
6cceedba77
|
|
@ -18,4 +18,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
check_filenames: true
|
check_filenames: true
|
||||||
ignore_words_list: aks,ags,startin
|
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"
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1
|
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1
|
||||||
|
# Search for all the tar.* inside the backup dir to support the migration between gzip vs zstd
|
||||||
latest=$(find ${BACKUP_DIR} -name '*.tar.zstd' -exec basename {} \; | sort -g | tail -n 1)
|
latest=$(find ${BACKUP_DIR} -name '*.tar.*' -exec basename {} \; | sort -g | tail -n 1)
|
||||||
|
|
||||||
if [[ "${latest}" == "" ]]; then
|
if [[ "${latest}" == "" ]]; then
|
||||||
echo "-1"
|
echo "-1"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue