The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hyperlane-monorepo/scripts/sync-submodules.sh

33 lines
800 B

#!/usr/bin/env bash
# This is designed to synchronize the typescript submodules in the current state with the committed
# submodule version and then clean and build the typescript codebase. This will not update the
# submodules, only bring them to the same version as they are in `.gitmodules`.
set -e
DIRNAME=$(basename "$PWD")
if [[ "$DIRNAME" != "hyperlane-monorepo" ]]; then
echo "Must be run from the root of the monorepo"
exit 1
fi
DIRS=$(git submodule status | grep -oE "typescript/[a-zA-Z0-9_-]+")
for DIR in $DIRS ; do
echo "Removing '$DIR'"
rm -rf "$DIR"
done
git submodule init
git submodule update
for DIR in $DIRS ; do
echo "Cleaning '$DIR'"
pushd "$DIR" || continue
rm -rf yarn.lock node_modules
popd || exit 1
done
yarn clean
yarn install
yarn build