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

Commit

Permalink
[epociask/issue-172-version-pinned-devnet-allocs] checkout branch vs.…
Browse files Browse the repository at this point in the history
… install zip
  • Loading branch information
Ethen Pociask committed Nov 3, 2023
1 parent 6328f7b commit 651bf7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/hygeine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: make go-gen-mocks && git diff --exit-code

ensure-devnet-allocs:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

Expand Down
12 changes: 5 additions & 7 deletions scripts/devnet-allocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VERSION=$(cat go.mod | grep ethereum-optimism/optimism | awk '{print $2}' | sed
REPO_NAME=optimism-$(echo ${VERSION} | sed 's/v//g')

echo "Downloading ${REPO_NAME} ..."
wget https://github.com/ethereum-optimism/optimism/archive/refs/tags/${VERSION}.zip
git clone https://github.com/ethereum-optimism/optimism.git ${REPO_NAME}

## (2) Unzip and enter the monorepo
echo "Unzipping..."
Expand All @@ -15,22 +15,20 @@ rm -rf ${VERSION}.zip
## (3) Get version string without first 'v'
VERSION=$(echo ${VERSION} | sed 's/v//g')
echo "Version: ${VERSION}"
cd optimism-${VERSION}
cd ${REPO_NAME}
git checkout ${VERSION}

## (4) Install monorepo dependencies
## (4.a) Generate devnet allocations and persist them all into .devnet folder
echo "Initializing monorepo..."
git submodule init &&
git submodule update &&
git submodule foreach 'git fetch origin; git checkout $(git rev-parse --abbrev-ref HEAD); git reset --hard origin/$(git rev-parse --abbrev-ref HEAD); git submodule update --recursive; git clean -dfx' &&
make install-geth &&
git submodule update --init --recursive &&
make devnet-allocs &&
mv .devnet ../.devnet &&
mv packages/contracts-bedrock/deploy-config/devnetL1.json ../.devnet/devnetL1.json

STATUS=$?

## (4.b) Force cleanup of monorepo
## (5) Force cleanup of monorepo
echo "${STATUS} Cleaning up ${REPO_NAME} repo ..." &&
cd ../ &&
rm -rf ${REPO_NAME}
Expand Down

0 comments on commit 651bf7e

Please sign in to comment.