Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions scripts/migrate_barretenberg_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ if ! git diff-index --quiet HEAD --; then
exit 1
fi

# Check if the current branch is master
current_branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$current_branch" != "master" ]; then
echo "Error: This script must be run from the 'master' branch. Current branch is '$current_branch'"
exit 1
fi

# Fetch the latest updates from origin
git fetch origin

# Check if master is same as origin/master
if ! git diff --quiet master origin/master; then
echo "Error: Local 'master' branch is not up to date with 'origin/master'. Please pull the latest changes."
exit 1
fi

BRANCH="$1"
COMMIT_MESSAGE="$2"
SUBREPO_PATH=circuits/cpp/barretenberg # can be changed to another subrepo if useful
Expand Down