Skip to content

Commit

Permalink
fix: macos install/update compat
Browse files Browse the repository at this point in the history
  • Loading branch information
av committed Sep 27, 2024
1 parent a00b571 commit 4a7a982
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion harbor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ unsafe_update() {
}

resolve_harbor_version() {
git ls-remote --tags "$harbor_repo_url" | grep -o "v.*" | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | head -n 1
curl -s "$harbor_release_url" | sed -n 's/.*"tag_name": "\(.*\)".*/\1/p'
}

update_harbor() {
Expand Down Expand Up @@ -3307,6 +3307,7 @@ run_stt_command() {
# Globals
version="0.1.31"
harbor_repo_url="https://github.com/av/harbor.git"
harbor_release_url="https://api.github.com/repos/av/harbor/releases/latest"
delimiter="|"
scramble_exit_code=42
harbor_home=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
Expand Down
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ set -e

HARBOR_INSTALL_PATH="${HOME}/.harbor"
HARBOR_REPO_URL="https://github.com/av/harbor.git"
HARBOR_RELEASE_URL="https://api.github.com/repos/av/harbor/releases/latest"
HARBOR_VERSION=""

# ========================================

resolve_harbor_version() {
git ls-remote --tags "$HARBOR_REPO_URL" | grep -o "v.*" | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | head -n 1
curl -s "$HARBOR_RELEASE_URL" | sed -n 's/.*"tag_name": "\(.*\)".*/\1/p'
}

check_dependencies() {
Expand Down

0 comments on commit 4a7a982

Please sign in to comment.