Skip to content

Commit 33b5e4c

Browse files
committed
Skip git hooks when publishing release
Signed-off-by: Vladislav Polyakov <polRk@ydb.tech>
1 parent a0f39b6 commit 33b5e4c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ jobs:
3333
version: npm run version
3434
publish: npm run publish
3535
env:
36+
SKIP_HOOKS: true
3637
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3738
NPM_TOKEN: ''

scripts/hooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
66

77
git stash --keep-index --include-untracked -q
88
cleanup() {
9-
git stash pop -q 2>/dev/null || true
9+
git stash pop -q 2>/dev/null || true
1010
}
1111
trap cleanup EXIT
1212

scripts/hooks/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
if [[ "${SKIP_HOOKS:-}" == "true" ]]; then
5+
exit 0
6+
fi
7+
48
npx turbo run build --filter=...[origin/main]
59

610
npx turbo run test --filter=...[origin/main]

0 commit comments

Comments
 (0)