Skip to content

Commit

Permalink
Fix set hooks command
Browse files Browse the repository at this point in the history
  • Loading branch information
ramesaliyev committed Jul 29, 2024
1 parent 85ca9c3 commit a351c5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"type": "module",
"scripts": {
"// Githooks": "",
"gh-pre-commit": "node tools/pre-deploy",
"set-githooks": "node scripts/githooks/_set",
"gh:pre-commit": "node tools/pre-deploy",
"set:githooks": "node tools/githooks/_set",

"// Deployment": "",
"manual-deploy": "node tools/pre-deploy && wrangler deploy -c packages/worker/wrangler.toml --env $WORKER_ENV",
"manual-deploy-prod": "WORKER_ENV=prod npm run manual-deploy",
"manual-deploy:prod": "WORKER_ENV=prod npm run manual-deploy",

"// Testing": "",
"test": "vitest",
Expand Down
3 changes: 1 addition & 2 deletions tools/githooks/_set.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ function writeHookFile(hookName, command) {
}

// Create hooks.
writeHookFile('pre-commit', 'npm run gh-pre-commit');
writeHookFile('pre-push', 'npm run gh-pre-push');
writeHookFile('pre-commit', 'npm run gh:pre-commit');

// We're done.
console.log('Git hooks has been set up successfully.');

0 comments on commit a351c5f

Please sign in to comment.