Created
August 21, 2024 01:32
-
-
Save ajsutton/d9ef96543d68d01751a9f216ce294075 to your computer and use it in GitHub Desktop.
Build All op-program Releases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
SCRIPTS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | |
STATES_DIR="${SCRIPTS_DIR}/../temp/states" | |
BIN_DIR="${SCRIPTS_DIR}/../bin/" | |
mkdir -p "${STATES_DIR}" | |
cd "${SCRIPTS_DIR}/../../" | |
VERSIONS=$(git tag | grep 'op-program\/v') | |
for VERSION in ${VERSIONS} | |
do | |
echo "Version: ${VERSION}" | |
git checkout "${VERSION}" | |
make reproducible-prestate | |
HASH=$(cat "${BIN_DIR}/prestate-proof.json" | jq -r .pre) | |
cp "${BIN_DIR}/prestate.json" "${STATES_DIR}/${HASH}.json" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Place this script in the
op-program/scripts
directory of the monorepo and run it. It will generate the prestate for all op-program release tags (rungit fetch
first to ensure you have them all) and place them inop-program/temp/states
named correctly to work with the--cannon-prestates-url
option.