summaryrefslogtreecommitdiffhomepage
path: root/.husky
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-11-27 15:50:23 -0500
committerDax Raad <[email protected]>2025-11-27 15:50:23 -0500
commit776091cc232a37656eb9087d76c64b2e67c401c1 (patch)
tree5f707dd2ad3253b4d6559b26463914e4b462ef51 /.husky
parentf385524f48f03e9f019b1a12ee22a6ac00d9a375 (diff)
downloadopencode-776091cc232a37656eb9087d76c64b2e67c401c1.tar.gz
opencode-776091cc232a37656eb9087d76c64b2e67c401c1.zip
ci: add bun version check to pre-push hook to ensure version consistency
Diffstat (limited to '.husky')
-rwxr-xr-x.husky/pre-push7
1 files changed, 7 insertions, 0 deletions
diff --git a/.husky/pre-push b/.husky/pre-push
index b26017ee9..2fd039d56 100755
--- a/.husky/pre-push
+++ b/.husky/pre-push
@@ -1,2 +1,9 @@
#!/bin/sh
+# Check if bun version matches package.json
+EXPECTED_VERSION=$(grep '"packageManager"' package.json | sed 's/.*"bun@\([^"]*\)".*/\1/')
+CURRENT_VERSION=$(bun --version)
+if [ "$CURRENT_VERSION" != "$EXPECTED_VERSION" ]; then
+ echo "Error: Bun version $CURRENT_VERSION does not match expected version $EXPECTED_VERSION from package.json"
+ exit 1
+fi
bun typecheck