Skip to content

Commit

Permalink
Merge pull request #3 from moneyforward/fix-install-packages
Browse files Browse the repository at this point in the history
fix: add curl and jq
  • Loading branch information
vinhyenvodoi98 authored Oct 26, 2023
2 parents 90af091 + e4385e4 commit 605d738
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/scripts/cancel.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
#!/bin/bash

# Update and install packages using apk on Alpine Linux
if command -v apk &> /dev/null; then
sudo apk update && sudo apk add jq curl

# Update and install packages using yum on CentOS
elif command -v yum &> /dev/null; then
sudo yum update && sudo yum install jq curl

# Update and install packages using apt on Debian-based systems
elif command -v apt-get &> /dev/null; then
sudo apt update && sudo apt install jq curl

# If none of the package managers are found
else
echo "Unsupported package manager. Please install jq and curl before run this orb."
fi

if [ "$CIRCLE_BRANCH" != "$DEFAULT_BRANCH" ]; then
echo 'Not on default branch, no need to manually cancel duplicate workflow'
exit
Expand Down

0 comments on commit 605d738

Please sign in to comment.