Skip to content

Commit

Permalink
set ziti repo owner for fetching quickstart binary
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Sep 23, 2024
1 parent 8c40f08 commit d40fc26
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions quickstart/docker/image/ziti-cli-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ ASCI_BLUE='\033[00;34m'
ASCI_PURPLE='\033[00;35m'
ZITIx_EXPRESS_COMPLETE=""

: "${GITHUB_OWNER:=openziti}"
: "${GITHUB_REPO:=ziti}"

function WHITE {
echo "${ASCI_WHITE}${1-}${ASCI_RESTORE}"
}
Expand Down Expand Up @@ -245,7 +248,7 @@ function _check_env_variable() {
_error=true
fi
else
echo -e " * $(RED "Unsupported shell, supply a PR or log an issue on https://github.com/openziti/ziti") "
echo -e " * $(RED "Unsupported shell, supply a PR or log an issue on https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}") "
return 1
fi
done
Expand Down Expand Up @@ -737,7 +740,7 @@ function getZiti {
fi

# Get the download link
zitidl="https://github.com/openziti/ziti/releases/download/${ZITI_BINARIES_VERSION-}/${ZITI_BINARIES_FILE}"
zitidl="https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}/releases/download/${ZITI_BINARIES_VERSION-}/${ZITI_BINARIES_FILE}"
echo -e 'Downloading '"$(BLUE "${zitidl}")"' to '"$(BLUE "${ziti_binaries_file_abspath}")"
curl -Ls "${zitidl}" -o "${ziti_binaries_file_abspath}"

Expand Down Expand Up @@ -1137,7 +1140,7 @@ function getLatestZitiVersion {

_detect_architecture

ziti_latest=$(curl -s https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}api.github.com/repos/openziti/ziti/releases/latest)
ziti_latest=$(curl -s https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}api.github.com/repos/${GITHUB_OWNER}/${GITHUB_REPO}/releases/latest)
ZITI_BINARIES_FILE=$(printf "%s" "${ziti_latest}" | tr '\r\n' ' ' | jq -r '.assets[] | select(.name | startswith("'"ziti-${ZITI_OSTYPE}-${ZITI_ARCH}-"'")) | .name')
ZITI_BINARIES_VERSION=$(printf "%s" "${ziti_latest}" | tr '\r\n' ' ' | jq -r '.tag_name')
}
Expand Down Expand Up @@ -1494,7 +1497,7 @@ function _verify_ziti_version_exists {

_detect_architecture

ziticurl="$(curl -s https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}api.github.com/repos/openziti/ziti/releases/tags/"${ZITI_VERSION_OVERRIDE}")"
ziticurl="$(curl -s https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}api.github.com/repos/${GITHUB_OWNER}/${GITHUB_REPO}/releases/tags/"${ZITI_VERSION_OVERRIDE}")"
ZITI_BINARIES_FILE=$(echo "${ziticurl}" | tr '\r\n' ' ' | jq -r '.assets[] | select(.name | startswith("'"ziti-${ZITI_OSTYPE}-${ZITI_ARCH}-"'")) | .name')
ZITI_BINARIES_VERSION=$(echo "${ziticurl}" | tr '\r\n' ' ' | jq -r '.tag_name')

Expand Down

0 comments on commit d40fc26

Please sign in to comment.