Skip to content

Commit

Permalink
pw_env_setup: Add helper to install CIPD hook
Browse files Browse the repository at this point in the history
Add a helper in util.sh to install the CIPD post-checkout hook. It's not
used anywhere, but downstream projects can add it to their local copy of
bootstrap.sh.

Change-Id: Iaaaeffe1d9fe163ff6b1552618b35dc5808d7c9b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/105165
Commit-Queue: Rob Mohr <mohrr@google.com>
Reviewed-by: Anthony DiGirolamo <tonymd@google.com>
  • Loading branch information
mohrr authored and CQ Bot Account committed Aug 5, 2022
1 parent abed81c commit ca6de89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pw_env_setup/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ pw_finalize() {
fi
}

pw_install_post_checkout_hook() {
cp "$PW_ROOT/pw_env_setup/post-checkout-hook.sh" "$PW_PROJECT_ROOT/.git/hooks/post-checkout"
}

pw_cleanup() {
unset _PW_BANNER
unset _PW_BANNER_FUNC
Expand Down Expand Up @@ -326,6 +330,7 @@ pw_cleanup() {
unset -f pw_bootstrap
unset -f pw_activate
unset -f pw_finalize
unset -f pw_install_post_checkout_hook
unset -f pw_cleanup
unset -f _pw_hello
unset -f pw_error
Expand Down

0 comments on commit ca6de89

Please sign in to comment.