Skip to content

Commit 4fb1872

Browse files
committed
Staleness helper
1 parent 7ea5e70 commit 4fb1872

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

hooks/environment

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ set -ueo pipefail
33

44
PLUGIN_DIR=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
55

6-
git -C $PLUGIN_DIR checkout main
7-
git -C $PLUGIN_DIR pull
6+
# Ensure main isn't kept stale
7+
if [[ "$PLUGIN_DIR" == */main ]]; then
8+
git -C $PLUGIN_DIR checkout main
9+
git -C $PLUGIN_DIR pull
10+
fi
811

912
BAO_ADDR=https://vault.giellalt.org
1013
BAO_TOKEN=$(buildkite-agent secret get divvun_actions_openbao_service_token)

0 commit comments

Comments
 (0)