Skip to content

Commit

Permalink
Use HashiCorp Releases API to get latest version (#8)
Browse files Browse the repository at this point in the history
* Use HashiCorp Releases API to get latest version

* move `orbs` stanza to top-level
  • Loading branch information
smaeda-ks authored May 12, 2022
1 parent 6599b48 commit 0079196
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/@orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ description: |
display:
source_url: https://github.com/smaeda-ks/orb-hashicorp-vault-cli

# If your orb requires other orbs, you can import them like this. Otherwise remove the "orbs" stanza.
# orbs:
# hello: circleci/[email protected]
orbs:
jq: circleci/[email protected]
3 changes: 2 additions & 1 deletion src/commands/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ parameters:
description: Directory in which to install vault
type: string
steps:
- jq/install
- run:
command: |
# Quietly try to make the install directory.
Expand All @@ -35,7 +36,7 @@ steps:
if [ ! "$PARAM_VAULT_VERSION" = "latest" ]; then
export VAULT_VER_STRING="$PARAM_VAULT_VERSION"
else
PARAM_VAULT_VERSION=$(basename $(curl -fs -o /dev/null -w %{redirect_url} https://github.com/hashicorp/vault/releases/latest) | sed 's/v//')
PARAM_VAULT_VERSION=$(curl -fs https://api.releases.hashicorp.com/v1/releases/vault/latest | jq -r '.version')
export VAULT_VER_STRING="$PARAM_VAULT_VERSION"
fi
Expand Down

0 comments on commit 0079196

Please sign in to comment.