-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict' | ||
|
||
const utils = require('../src/utils') | ||
|
||
const exists = require('fs').existsSync | ||
const rename = require('fs').renameSync | ||
const join = require('path').join | ||
const read = require('fs').readFileSync | ||
const write = require('fs').writeFileSync | ||
|
||
const hooksDir = utils.getPathToHooks() | ||
const hook = join(hooksDir, 'commit-msg') | ||
|
||
if (exists(hook)) { | ||
console.log('Old hook is going to be moved to commit-msg.bak') | ||
rename(hook, join(hooksDir, 'commit-msg.bak')) | ||
} | ||
|
||
write(hook, read(join(__dirname, '..', 'hooks', 'commit-msg'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict' | ||
|
||
const utils = require('../src/utils') | ||
|
||
const exists = require('fs').existsSync | ||
const rename = require('fs').renameSync | ||
const remove = require('fs').unlinkSync | ||
const join = require('path').join | ||
|
||
const hooksDir = utils.getPathToHooks() | ||
const hook = join(hooksDir, 'commit-msg') | ||
const oldHook = join(hook, '.bak') | ||
|
||
if (exists(hook)) { | ||
remove(hook) | ||
} | ||
|
||
if (exists(oldHook)) { | ||
rename(oldHook, hook) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
./node_modules/.bin/commitlint -x "@commitlint/config-conventional" -e $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,9 @@ | |
"watch": "cross-env AEGIR_TEST=hello node cli.js test -t node --watch", | ||
"release": "npm run test && node cli.js release --no-build --no-test", | ||
"release-minor": "npm run test && node cli.js release --no-build --no-test --type minor", | ||
"release-major": "npm run test && node cli.js release --no-build --no-test --type major" | ||
"release-major": "npm run test && node cli.js release --no-build --no-test --type major", | ||
"install": "node ./bin/install.js", | ||
"uninstall": "node ./bin/uninstall.js" | ||
}, | ||
"keywords": [ | ||
"webpack", | ||
|
@@ -29,6 +31,8 @@ | |
"author": "Friedel Ziegelmayer <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@commitlint/cli": "^6.0.2", | ||
"@commitlint/config-conventional": "^6.0.2", | ||
"async": "^2.6.0", | ||
"browserify-zlib": "^0.2.0", | ||
"chalk": "^2.3.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters