Skip to content

Commit

Permalink
feat(conftest)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ant0wan committed Oct 24, 2024
1 parent 8fca20b commit f96f94e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/conftest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
set -o errexit
LATEST_VERSION=$(wget -O - "https://api.github.com/repos/open-policy-agent/conftest/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-)
ARCH=$(arch)
SYSTEM=$(uname)
TMP="/tmp/conftest"
mkdir -p "$TMP"
wget "https://github.com/open-policy-agent/conftest/releases/download/v${LATEST_VERSION}/conftest_${LATEST_VERSION}_${SYSTEM}_${ARCH}.tar.gz" -P "$TMP"
tar xzf "$TMP/conftest_${LATEST_VERSION}_${SYSTEM}_${ARCH}.tar.gz" -C "$TMP"
sudo mv "$TMP/conftest" /usr/local/bin

0 comments on commit f96f94e

Please sign in to comment.