Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit d10ce91

Browse files
matifalimafredri
andauthored
fix: fix fetching rc versions of vault cli (#156)
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
1 parent 5344916 commit d10ce91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

vault-github/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ unzip_safe() {
3434
install() {
3535
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
3636
if [ "$${INSTALL_VERSION}" = "latest" ]; then
37-
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
37+
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)
3838
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
3939
if [ -z "$${LATEST_VERSION}" ]; then
4040
printf "Failed to determine the latest Vault version.\n"

vault-token/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ unzip_safe() {
3232
install() {
3333
# Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
3434
if [ "$${INSTALL_VERSION}" = "latest" ]; then
35-
LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
35+
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)
3636
printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}"
3737
if [ -z "$${LATEST_VERSION}" ]; then
3838
printf "Failed to determine the latest Vault version.\n"

0 commit comments

Comments
 (0)