This repository was archived by the owner on May 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +25
-5
lines changed Expand file tree Collapse file tree 5 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 1010 "devDependencies" : {
1111 "bun-types" : " ^1.0.18" ,
1212 "gray-matter" : " ^4.0.3" ,
13- "marked" : " ^11.1 .0" ,
13+ "marked" : " ^12.0 .0" ,
1414 "prettier-plugin-sh" : " ^0.13.1" ,
1515 "prettier-plugin-terraform-formatter" : " ^1.2.1"
1616 },
Original file line number Diff line number Diff line change 11import { describe } from "bun:test" ;
22import { runTerraformInit , testRequiredVariables } from "../test" ;
33
4- describe ( "vault-token " , async ( ) => {
4+ describe ( "vault-github " , async ( ) => {
55 await runTerraformInit ( import . meta. dir ) ;
66
77 testRequiredVariables ( import . meta. dir , {
Original file line number Diff line number Diff line change @@ -32,9 +32,19 @@ unzip_safe() {
3232}
3333
3434install () {
35+ # Get the architecture of the system
36+ ARCH=$( uname -m)
37+ if [ " $$ {ARCH}" = " x86_64" ]; then
38+ ARCH=" amd64"
39+ elif [ " $$ {ARCH}" = " aarch64" ]; then
40+ ARCH=" arm64"
41+ else
42+ printf " Unsupported architecture: $$ {ARCH}\n"
43+ return 1
44+ fi
3545 # Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
3646 if [ " $$ {INSTALL_VERSION}" = " latest" ]; then
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)
47+ LATEST_VERSION=$( curl -s https://releases.hashicorp.com/vault/ | grep -v ' rc' | grep -oE ' vault/[0-9]+\.[0-9]+\.[0-9]+' | sed ' s/vault\/// ' | sort -V | tail -n 1)
3848 printf " Latest version of Vault is %s.\n\n" " $$ {LATEST_VERSION}"
3949 if [ -z " $$ {LATEST_VERSION}" ]; then
4050 printf " Failed to determine the latest Vault version.\n"
@@ -60,7 +70,7 @@ install() {
6070 else
6171 printf " Upgrading Vault CLI from version %s to %s ...\n\n" " $$ {CURRENT_VERSION}" " ${INSTALL_VERSION} "
6272 fi
63- fetch vault.zip " https://releases.hashicorp.com/vault/$$ {INSTALL_VERSION}/vault_$$ {INSTALL_VERSION}_linux_amd64 .zip"
73+ fetch vault.zip " https://releases.hashicorp.com/vault/$$ {INSTALL_VERSION}/vault_$$ {INSTALL_VERSION}_linux_ $$ {ARCH} .zip"
6474 if [ $? -ne 0 ]; then
6575 printf " Failed to download Vault.\n"
6676 return 1
Original file line number Diff line number Diff line change @@ -30,9 +30,19 @@ unzip_safe() {
3030}
3131
3232install () {
33+ # Get the architecture of the system
34+ ARCH=$( uname -m)
35+ if [ " $$ {ARCH}" = " x86_64" ]; then
36+ ARCH=" amd64"
37+ elif [ " $$ {ARCH}" = " aarch64" ]; then
38+ ARCH=" arm64"
39+ else
40+ printf " Unsupported architecture: $$ {ARCH}\n"
41+ return 1
42+ fi
3343 # Fetch the latest version of Vault if INSTALL_VERSION is 'latest'
3444 if [ " $$ {INSTALL_VERSION}" = " latest" ]; then
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)
45+ LATEST_VERSION=$( curl -s https://releases.hashicorp.com/vault/ | grep -v ' rc' | grep -oE ' vault/[0-9]+\.[0-9]+\.[0-9]+' | sed ' s/vault\/// ' | sort -V | tail -n 1)
3646 printf " Latest version of Vault is %s.\n\n" " $$ {LATEST_VERSION}"
3747 if [ -z " $$ {LATEST_VERSION}" ]; then
3848 printf " Failed to determine the latest Vault version.\n"
You can’t perform that action at this time.
0 commit comments