[Ubuntu] Implement helper to get GitHub package download URL (#4947)

This commit is contained in:
Dibir Magomedsaygitov
2022-02-08 19:41:23 +03:00
committed by GitHub
parent cb8931646f
commit 404da76e17
14 changed files with 47 additions and 34 deletions

View File

@@ -7,8 +7,7 @@
source $HELPER_SCRIPTS/install.sh
# Determine latest ORAS CLI version
ORAS_CLI_LATEST_VERSION_URL=https://api.github.com/repos/oras-project/oras/releases/latest
ORAS_CLI_DOWNLOAD_URL=$(curl -sfL $ORAS_CLI_LATEST_VERSION_URL | jq -r '.assets[].browser_download_url | select(endswith("linux_amd64.tar.gz"))')
ORAS_CLI_DOWNLOAD_URL=$(get_github_package_download_url "oras-project/oras" "endswith(\"linux_amd64.tar.gz\")")
ORAS_CLI_ARCHIVE=$(basename $ORAS_CLI_DOWNLOAD_URL)
# Install ORAS CLI