Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add check to bb migrate script #1319

Merged
merged 1 commit into from
Jul 31, 2023
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