Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Buildah cache test (#644)
Browse files Browse the repository at this point in the history
* ci-unified env cache

* upd fl

* download-forklift curl fix

* fix download-forklift.sh

---------

Co-authored-by: alvicsam <[email protected]>
  • Loading branch information
AndWeHaveAPlan and alvicsam authored Jul 16, 2024
1 parent 2d9e17a commit e9ec5aa
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions dockerfiles/ci-unified/download-forklift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ while getopts "p:v:" flag; do
esac
done


echo "Downloading forklift $VERSION to $DL_PATH"


RELEASE_URL="https://api.github.com/repos/paritytech/forklift/releases/tags/$VERSION"

if [ $VERSION="latest" ]
then
if [[ "latest" == $VERSION ]]; then
RELEASE_URL="https://api.github.com/repos/paritytech/forklift/releases/latest"
fi

echo "Downloading forklift $VERSION to $DL_PATH from $RELEASE_URL"

RELEASE=`curl -s $RELEASE_URL`
ASSET=`jq '.assets[] | select(.name | endswith("linux_amd64"))' <<< "$RELEASE"`
Expand All @@ -37,7 +33,7 @@ ASSET_NAME=`jq -r '.name' <<< "$ASSET"`
ASSET_URL=`jq -r '.browser_download_url' <<< "$ASSET"`

mkdir -p $DL_PATH
curl -s -o $DL_PATH/$ASSET_NAME -L $ASSET_URL
curl -L -s -o $DL_PATH/$ASSET_NAME -L $ASSET_URL
cp -r $DL_PATH/$ASSET_NAME /usr/local/bin/forklift

chmod 755 /usr/local/bin/forklift

0 comments on commit e9ec5aa

Please sign in to comment.