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] changed status hand…
Browse files Browse the repository at this point in the history
…ling
  • Loading branch information
Ethen Pociask committed Nov 3, 2023
1 parent 8c7ee7a commit f8fb01f
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions scripts/devnet-allocs.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

## (1) Fetch monorepo binary at specific version used by Pessimism
VERSION=$(cat go.mod | grep ethereum-optimism/optimism | awk '{print $2}' | sed 's/\/v//g')
REPO_NAME=optimism-$(echo ${VERSION} | sed 's/v//g')
Expand All @@ -16,28 +18,26 @@ echo "Version: ${VERSION}"
cd optimism-${VERSION}

## (4) Install monorepo dependencies
{
## (4.a) Generate devnet allocations and persist them all into .devnet folder
echo "Initializing monorepo..." &&
git submodule update --init --recursive &&
make install-geth &&
make devnet-allocs &&
mv .devnet ../.devnet &&
mv packages/contracts-bedrock/deploy-config/devnetL1.json ../.devnet/devnetL1.json

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

if [ $? -eq 0 ] ; then
echo "Successfully cleaned up ${REPO_NAME} repo"
exit ${STATUS}
else
echo "Failed to clean up ${REPO_NAME} repo"
exit ${STATUS}

fi
}
## (4.a) Generate devnet allocations and persist them all into .devnet folder
echo "Initializing monorepo..."
git submodule update --init --recursive &&
make install-geth &&
make devnet-allocs &&
mv .devnet ../.devnet &&
mv packages/contracts-bedrock/deploy-config/devnetL1.json ../.devnet/devnetL1.json

STATUS=$?

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

if [ $? -eq 0 ] ; then
echo "Successfully cleaned up ${REPO_NAME} repo"
exit ${STATUS}
else
echo "Failed to clean up ${REPO_NAME} repo"
exit ${STATUS}

fi

0 comments on commit f8fb01f

Please sign in to comment.