fix: fix fetching rc versions of vault cli (#156)
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This commit is contained in:
committed by
GitHub
parent
534491613f
commit
72db445843
@@ -34,7 +34,7 @@ unzip_safe() {
|
|||||||
install() {
|
install() {
|
||||||
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
|
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
|
||||||
if [ "$${INSTALL_VERSION}" = "latest" ]; then
|
if [ "$${INSTALL_VERSION}" = "latest" ]; then
|
||||||
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -v '-rc' | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
||||||
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
|
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
|
||||||
if [ -z "$${LATEST_VERSION}" ]; then
|
if [ -z "$${LATEST_VERSION}" ]; then
|
||||||
printf "Failed to determine the latest Vault version.\n"
|
printf "Failed to determine the latest Vault version.\n"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ unzip_safe() {
|
|||||||
install() {
|
install() {
|
||||||
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
|
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
|
||||||
if [ "$${INSTALL_VERSION}" = "latest" ]; then
|
if [ "$${INSTALL_VERSION}" = "latest" ]; then
|
||||||
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -v '-rc' | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
||||||
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
|
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
|
||||||
if [ -z "$${LATEST_VERSION}" ]; then
|
if [ -z "$${LATEST_VERSION}" ]; then
|
||||||
printf "Failed to determine the latest Vault version.\n"
|
printf "Failed to determine the latest Vault version.\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user