mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-08 00:37:27 +00:00
Handle case where VERSION is provided as an input
If VERSION is provided, VERSION_SLUG will never be set and VERSION will be overwritten with a bad value. Signed-off-by: Joel Guedj <joel.guedj@gmail.com>
This commit is contained in:
parent
1dc3ff6c59
commit
5b422bef17
1 changed files with 2 additions and 2 deletions
|
|
@ -36,9 +36,9 @@ runs:
|
|||
# Ref: https://github.com/fluxcd/flux2/issues/3509#issuecomment-1400820992
|
||||
VERSION_SLUG=$(curl https://api.github.com/repos/fluxcd/flux2/releases/latest --silent --location | grep tag_name)
|
||||
fi
|
||||
fi
|
||||
|
||||
VERSION=$(echo "${VERSION_SLUG}" | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
|
||||
VERSION=$(echo "${VERSION_SLUG}" | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
|
||||
fi
|
||||
|
||||
BIN_URL="https://github.com/fluxcd/flux2/releases/download/v${VERSION}/flux_${VERSION}_linux_${ARCH}.tar.gz"
|
||||
curl --silent --fail --location "${BIN_URL}" --output /tmp/flux.tar.gz
|
||||
|
|
|
|||
Loading…
Reference in a new issue