From 34879256d41a61137447c5984cdccd47d7cd3e99 Mon Sep 17 00:00:00 2001 From: Ivan Charapanau Date: Fri, 27 Sep 2024 20:57:25 +0200 Subject: [PATCH] chore: update/install - always fetch tags --- harbor.sh | 1 + install.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/harbor.sh b/harbor.sh index baa6557..100ebd5 100755 --- a/harbor.sh +++ b/harbor.sh @@ -1662,6 +1662,7 @@ update_harbor() { else harbor_version=$(resolve_harbor_version) log_info "Updating to version $harbor_version..." + git fetch --all --tags git checkout tags/$harbor_version fi diff --git a/install.sh b/install.sh index 47e19b3..242c14e 100755 --- a/install.sh +++ b/install.sh @@ -29,7 +29,8 @@ install_or_update_project() { if [ -d "$HARBOR_INSTALL_PATH" ]; then echo "Existing installation found. Updating..." cd "$HARBOR_INSTALL_PATH" - git pull + git fetch --all --tags + git checkout "tags/$HARBOR_VERSION" else echo "Cloning project repository..." git clone --depth 1 --branch "$HARBOR_VERSION" "$HARBOR_REPO_URL" "$HARBOR_INSTALL_PATH"