Skip to content

Commit

Permalink
chore: update install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Apr 25, 2024
1 parent 1ba9391 commit fd305b7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 31 deletions.
36 changes: 22 additions & 14 deletions scripts/install-plugin-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,46 @@
set -e
set -x

VERSION="0.1.0"
VERSION="0.1.1"

mkdir -p ~/bin
mkdir -p ~/.pact/bin
case "$(uname -s)" in

Darwin)
echo '== Installing plugin CLI for Mac OSX =='
if [ "$(uname -m)" == "arm64" ]; then
curl -L -o ~/bin/pact-plugin-cli.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-osx-aarch64.gz
if [ "$(uname -m)" = "arm64" ]; then
curl -L -o ~/.pact/bin/pact-plugin-cli.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-osx-aarch64.gz
else
curl -L -o ~/bin/pact-plugin-cli.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-osx-x86_64.gz
curl -L -o ~/.pact/bin/pact-plugin-cli.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-osx-x86_64.gz
fi
gunzip -N -f ~/bin/pact-plugin-cli.gz
chmod +x ~/bin/pact-plugin-cli
gunzip -N -f ~/.pact/bin/pact-plugin-cli.gz
chmod +x ~/.pact/bin/pact-plugin-cli
;;

Linux)
echo '== Installing plugin CLI for Linux =='
curl -L -o ~/bin/pact-plugin-cli.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-linux-x86_64.gz
gunzip -N -f ~/bin/pact-plugin-cli.gz
chmod +x ~/bin/pact-plugin-cli
if [ "$(uname -m)" = "aarch64" ]; then
curl -L -o ~/.pact/bin/pact-plugin-cli.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-linux-aarch64.gz
else
curl -L -o ~/.pact/bin/pact-plugin-cli.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-linux-x86_64.gz
fi
gunzip -N -f ~/.pact/bin/pact-plugin-cli.gz
chmod +x ~/.pact/bin/pact-plugin-cli
;;

CYGWIN*|MINGW32*|MSYS*|MINGW*)
echo '== Installing plugin CLI for MS Windows =='
curl -L -o ~/bin/pact-plugin-cli.exe.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-windows-x86_64.exe.gz
gunzip -N -f ~/bin/pact-plugin-cli.exe.gz
chmod +x ~/bin/pact-plugin-cli.exe
if [ "$(uname -m)" = "aarch64" ]; then
curl -L -o ~/.pact/bin/pact-plugin-cli.exe.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-windows-aarch64.exe.gz
else
curl -L -o ~/.pact/bin/pact-plugin-cli.exe.gz https://github.com/pact-foundation/pact-plugins/releases/download/pact-plugin-cli-v${VERSION}/pact-plugin-cli-windows-x86_64.exe.gz
fi
gunzip -N -f ~/.pact/bin/pact-plugin-cli.exe.gz
chmod +x ~/.pact/bin/pact-plugin-cli.exe
;;

*)
echo "ERROR: $(uname -s) is not a supported operating system"
exit 1
;;
esac
esac
42 changes: 25 additions & 17 deletions scripts/install-verifier-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,46 @@
set -e
set -x

VERSION="0.9.20"
VERSION="1.1.1"

mkdir -p ~/bin
mkdir -p ~/.pact/bin
case "$(uname -s)" in

Darwin)
echo '== Installing verifier CLI for Mac OSX =='
if [ "$(uname -m)" == "arm64" ]; then
curl -L -o ~/bin/pact_verifier_cli.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-osx-aarch64.gz
echo '== Installing pact verifier CLI for Mac OSX =='
if [ "$(uname -m)" = "arm64" ]; then
curl -L -o ~/.pact/bin/pact_verifier_cli.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-osx-aarch64.gz
else
curl -L -o ~/bin/pact_verifier_cli.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-osx-x86_64.gz
curl -L -o ~/.pact/bin/pact_verifier_cli.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-osx-x86_64.gz
fi
gunzip -N -f ~/bin/pact_verifier_cli.gz
chmod +x ~/bin/pact_verifier_cli
gunzip -N -f ~/.pact/bin/pact_verifier_cli.gz
chmod +x ~/.pact/bin/pact_verifier_cli
;;

Linux)
echo '== Installing verifier CLI for Linux =='
curl -L -o ~/bin/pact_verifier_cli.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-linux-x86_64.gz
gunzip -N -f ~/bin/pact_verifier_cli.gz
chmod +x ~/bin/pact_verifier_cli
echo '== Installing pact verifier CLI for Linux =='
if [ "$(uname -m)" = "aarch64" ]; then
curl -L -o ~/.pact/bin/pact_verifier_cli.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-linux-aarch64.gz
else
curl -L -o ~/.pact/bin/pact_verifier_cli.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-linux-x86_64.gz
fi
gunzip -N -f ~/.pact/bin/pact_verifier_cli.gz
chmod +x ~/.pact/bin/pact_verifier_cli
;;

CYGWIN*|MINGW32*|MSYS*|MINGW*)
echo '== Installing verifier CLI for MS Windows =='
curl -L -o ~/bin/pact_verifier_cli.exe.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-windows-x86_64.exe.gz
gunzip -N -f ~/bin/pact_verifier_cli.exe.gz
chmod +x ~/bin/pact_verifier_cli.exe
echo '== Installing pact verifier CLI for MS Windows =='
if [ "$(uname -m)" = "aarch64" ]; then
curl -L -o ~/.pact/bin/pact_verifier_cli.exe.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-windows-aarch64.exe.gz
else
curl -L -o ~/.pact/bin/pact_verifier_cli.exe.gz https://github.com/pact-foundation/pact-reference/releases/download/pact_verifier_cli-v${VERSION}/pact_verifier_cli-windows-x86_64.exe.gz
fi
gunzip -N -f ~/.pact/bin/pact_verifier_cli.exe.gz
chmod +x ~/.pact/bin/pact_verifier_cli.exe
;;

*)
echo "ERROR: $(uname -s) is not a supported operating system"
exit 1
;;
esac
esac

0 comments on commit fd305b7

Please sign in to comment.