chore(cli): Adding option to keep backup directories (#1185)

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
Rajesh Rajendran 2023-04-19 11:42:51 +02:00 committed by GitHub
parent 606ac0d906
commit 9a520b6352
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -291,8 +291,9 @@ function upgrade() {
# Unless its upgrade release, always checkout same tag.
[[ $RELEASE_UPGRADE -eq 1 ]] || OR_VERSION=$or_version
time_now=$(date +%m-%d-%Y-%I%M%S)
# Creating backup dir of current installation
[[ -d "$OR_DIR/openreplay" ]] && sudo cp -rfb "$OR_DIR/openreplay" "$OR_DIR/openreplay_${or_version//\"}" && sudo rm -rf ${OR_DIR}/openreplay
[[ -d "$OR_DIR/openreplay" ]] && sudo mv "$OR_DIR/openreplay" "$OR_DIR/openreplay_${or_version//\"}_${time_now}"
clone_repo
err_cd openreplay/scripts/helmcharts