Skip to content

Commit

Permalink
fix wrong FOUNDRY_VERSION in setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Apr 12, 2024
1 parent 2af605e commit 578443e
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,26 @@
set -e

# Refer to https://github.com/foundry-rs/foundry/tags for the list of Foundry versions.
FOUNDRY_VERSION=nightly-2cf84d9f3ba7b6f4a9296299e7036ecc24cfa1da
FOUNDRY_VERSION="nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9"

if [[ "$CI" == "true" ]]
then
echo "Skipping as we are in the CI";
exit;
if [[ "${CI}" == "true" ]]; then
echo "Skipping as we are in the CI"
exit
fi

echo "Installing / Updating Foundry..."
if ! command -v foundryup &> /dev/null
then
if ! command -v foundryup &>/dev/null; then
echo "Installing foundryup..."
curl -L https://foundry.paradigm.xyz | bash

FOUNDRY_BASE_DIR=${XDG_CONFIG_HOME:-$HOME}
FOUNDRY_BIN_DIR="$FOUNDRY_BASE_DIR/.foundry/bin"
export PATH="$FOUNDRY_BIN_DIR:$PATH"
FOUNDRY_BASE_DIR=${XDG_CONFIG_HOME:-${HOME}}
FOUNDRY_BIN_DIR="${FOUNDRY_BASE_DIR}/.foundry/bin"
export PATH="${FOUNDRY_BIN_DIR}:${PATH}"
fi

if ! command -v forge &> /dev/null || [ ! "$(forge -V | grep -Eo '\b\w{7}\b')" = "2cf84d9" ]
then
echo "Installing foundry at $FOUNDRY_VERSION..."
foundryup --version $FOUNDRY_VERSION
if ! command -v forge &>/dev/null || [ ! "$(forge -V | grep -Eo '\b\w{7}\b')" = "f625d0f" ]; then
echo "Installing foundry at ${FOUNDRY_VERSION} ..."
foundryup --version ${FOUNDRY_VERSION}
fi

echo "Updating git submodules..."
Expand Down

0 comments on commit 578443e

Please sign in to comment.