File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 *
1111 */
1212import shell from 'shelljs'
13+ import path from 'path'
1314
1415const NO_HOOK_VAR = 'NO_HOOK'
1516const INNER_PRE_HOOK = 'CHATIE_INNER_PRE_HOOK'
@@ -55,7 +56,8 @@ if (refs?.[0]?.localCommit.match(/^0+$/)) {
5556 process . exit ( 0 )
5657}
5758
58- const packageVersion = require ( '../package.json' ) . version
59+ const pkgFile = path . join ( process . cwd ( ) , 'package . json ')
60+ const packageVersion = require ( pkgFile ) . version
5961const lastCommitMsg = shell . exec ( 'git log --pretty=format:"%s" HEAD^0 -1' , { silent : true } ) . stdout
6062
6163if ( packageVersion === lastCommitMsg ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " @chatie/git-scripts" ,
3- "version" : " 0.7.1 " ,
3+ "version" : " 0.7.3 " ,
44 "description" : " Git Hooks Integration for Chatie Projects" ,
55 "directories" : {
66 "doc" : " docs" ,
You can’t perform that action at this time.
0 commit comments