source:
Klonkt/.beads/hooks/pre-push
| Last change on this file was 76e9cfd, checked in by , 4 months ago | |
|---|---|
|
|
| File size: 781 bytes | |
| Line | |
|---|---|
| 1 | #!/usr/bin/env sh |
| 2 | # --- BEGIN BEADS INTEGRATION v1.0.4 --- |
| 3 | # This section is managed by beads. Do not remove these markers. |
| 4 | if command -v bd >/dev/null 2>&1; then |
| 5 | export BD_GIT_HOOK=1 |
| 6 | _bd_timeout=${BEADS_HOOK_TIMEOUT:-300} |
| 7 | if command -v timeout >/dev/null 2>&1; then |
| 8 | timeout "$_bd_timeout" bd hooks run pre-push "$@" |
| 9 | _bd_exit=$? |
| 10 | if [ $_bd_exit -eq 124 ]; then |
| 11 | echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads" |
| 12 | _bd_exit=0 |
| 13 | fi |
| 14 | else |
| 15 | bd hooks run pre-push "$@" |
| 16 | _bd_exit=$? |
| 17 | fi |
| 18 | if [ $_bd_exit -eq 3 ]; then |
| 19 | echo >&2 "beads: database not initialized — skipping hook 'pre-push'" |
| 20 | _bd_exit=0 |
| 21 | fi |
| 22 | if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi |
| 23 | fi |
| 24 | # --- END BEADS INTEGRATION v1.0.4 --- |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)