Skip to content

Commit

Permalink
refactor: ♻️ improve cz handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgrv committed Sep 17, 2024
1 parent a4aecf5 commit 6bf87c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/githooks/_prepare-commit-msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ if [ -t 1 ]; then
fi

# Install commitizen plugins
npm install --no-save commitizen 2>/dev/null 1>&2
npm install --no-save @commitlint/cli 2>/dev/null 1>&2
npm install --no-save $(cat package.json | npx --yes jqn '.config.commitizen.path' | tr -d "'[]:,") 2>/dev/null 1>&2

# Edit commit message
Expand Down
4 changes: 4 additions & 0 deletions src/githooks/configure-cz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
set -e

npm install -g commitizen @commitlint/cli git-cz @commitlint/cz-commitlint
2 changes: 1 addition & 1 deletion src/githooks/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Git Hooks",
"id": "githooks",
"version": "1.2.12",
"version": "1.3.0",
"description": "A feature to add useful Git hooks to your project",
"installsAfter": ["ghcr.io/devcontainers/features/common-utils"],
"dependsOn": {
Expand Down
4 changes: 2 additions & 2 deletions src/gitutils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Git Aliases",
"id": "gitutils",
"version": "1.7.0",
"version": "1.8.0",
"description": "A feature to add useful Git aliases to your shell.",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils",
Expand All @@ -12,4 +12,4 @@
"ghcr.io/tomgrv/devcontainer-features/gitversion": "5.*"
},
"postStartCommand": "/usr/local/share/gitutils/configure.sh"
}
}

0 comments on commit 6bf87c3

Please sign in to comment.