mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-26 01:15:00 +00:00
Merge pull request #1847 from OakNorthAI/let-user-set-version-to-install
feature: let user specify what version of flux-cli they want to install
This commit is contained in:
commit
59c3d84182
1 changed files with 7 additions and 1 deletions
|
|
@ -87,7 +87,13 @@ setup_tmp() {
|
||||||
|
|
||||||
# Find version from Github metadata
|
# Find version from Github metadata
|
||||||
get_release_version() {
|
get_release_version() {
|
||||||
METADATA_URL="https://api.github.com/repos/${GITHUB_REPO}/releases/latest"
|
if [[ -n "${FLUX_VERSION}" ]]; then
|
||||||
|
SUFFIX_URL="tags/v${FLUX_VERSION}"
|
||||||
|
else
|
||||||
|
SUFFIX_URL="latest"
|
||||||
|
fi
|
||||||
|
|
||||||
|
METADATA_URL="https://api.github.com/repos/${GITHUB_REPO}/releases/${SUFFIX_URL}"
|
||||||
|
|
||||||
info "Downloading metadata ${METADATA_URL}"
|
info "Downloading metadata ${METADATA_URL}"
|
||||||
download "${TMP_METADATA}" "${METADATA_URL}"
|
download "${TMP_METADATA}" "${METADATA_URL}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue