Skip to content

Commit

Permalink
reapplying reverted (not sure why it was) bootstrap.sh precommit upda…
Browse files Browse the repository at this point in the history
…te now that barretenberg is in its own submodule. (#52)
  • Loading branch information
dbanks12 committed Jan 28, 2023
1 parent 9cb7276 commit 4d35b45
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ rm -rf ./build
rm -rf ./build-wasm

# Install formatting git hook.
echo "cd ./cpp && ./format.sh staged" > ../.git/hooks/pre-commit
chmod +x ../.git/hooks/pre-commit
HOOKS_DIR=$(git rev-parse --git-path hooks)
# The pre-commit script will live in a barretenberg-specific hooks directory
# That may be just in the top level of this repository,
# or may be in a .git/modules/barretenberg subdirectory when this is actually a submodule
# Either way, running `git rev-parse --show-toplevel` from the hooks directory gives the path to barretenberg
echo "cd \$(git rev-parse --show-toplevel)/cpp && ./format.sh staged" > $HOOKS_DIR/pre-commit
chmod +x $HOOKS_DIR/pre-commit

# Determine system.
if [[ "$OSTYPE" == "darwin"* ]]; then
Expand Down

0 comments on commit 4d35b45

Please sign in to comment.