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"