Skip to content

Commit

Permalink
chore: switch to commitizen, husky and standard-version
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed May 30, 2022
1 parent 67c2731 commit a82cf72
Show file tree
Hide file tree
Showing 7 changed files with 1,726 additions and 31 deletions.
3 changes: 3 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

12 changes: 12 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Fetch the GIT diff and format it as command input:
DIFF=$(git -c diff.mnemonicprefix=false -c diff.noprefix=false --no-pager diff -r -p -m -M --full-index --no-color --staged | cat)

# Grumphp env vars

export GRUMPHP_GIT_WORKING_DIR="$(git rev-parse --show-toplevel)"

# Run GrumPHP
(cd "./" && printf "%s\n" "${DIFF}" | exec 'vendor/phpro/grumphp-shim/grumphp' 'git:pre-commit' '--skip-success-output')
2 changes: 2 additions & 0 deletions Changelog.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 3.8.0-beta4 / 2022-05-29

### Fixes:
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
"/blog/how-to-use-secrets.html"
],
},
"/Changelog.html"
"/CHANGELOG.html"
]
}
};
2 changes: 1 addition & 1 deletion docs/Changelog.md
23 changes: 22 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
{
"name": "phabalicious",
"version": "3.8.0-beta.4",
"main": "index.js",
"repository": "https://github.com/factorial-io/phabalicious.git",
"author": "Stephan Huber <[email protected]>",
"license": "MIT",
"private": true,
"devDependencies": {
"@commitlint/cli": "^17.0.1",
"@commitlint/config-conventional": "^17.0.0",
"@factorial/vuepress-theme": "1.0.0-alpha.1",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "3.3.0",
"cz-customizable": "^6.3.0",
"husky": "^8.0.1",
"standard-version": "^9.5.0",
"vuepress": "^1.1.0"
},
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
"docs:build": "vuepress build docs",
"postinstall": "husky install",
"release": "standard-version -t ''"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit a82cf72

Please sign in to comment.