@digitoimistodude/code-quality-checks 2.1.6 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/commit-msg +1 -1
- package/.husky/pre-commit +9 -2
- package/package.json +1 -1
package/.husky/commit-msg
CHANGED
|
@@ -101,7 +101,7 @@ if [ -f "$commit_msg_file" ]; then
|
|
|
101
101
|
if [ "$uncommitted_files" -gt 0 ]; then
|
|
102
102
|
local msg="• You have $uncommitted_files uncommitted files"
|
|
103
103
|
local msg_len=${#msg}
|
|
104
|
-
local padding=$((
|
|
104
|
+
local padding=$((57 - msg_len))
|
|
105
105
|
echo "${GREEN}║${NC} ${GREEN}${msg}${NC}$(printf '%*s' $padding '')${GREEN}║${NC}"
|
|
106
106
|
fi
|
|
107
107
|
|
package/.husky/pre-commit
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
# Pre commit hooks for Dude projects
|
|
2
2
|
# Ref: DEV-177, DEV-373, DEV-623
|
|
3
3
|
|
|
4
|
-
# Version:
|
|
5
|
-
|
|
4
|
+
# Version: dynamically read from CHANGELOG.md
|
|
5
|
+
if [ -f "CHANGELOG.md" ]; then
|
|
6
|
+
CHANGELOG_LINE=$(head -n 1 CHANGELOG.md)
|
|
7
|
+
VERSION_NUM=$(echo "$CHANGELOG_LINE" | sed 's/### //' | sed 's/:.*//')
|
|
8
|
+
VERSION_DATE=$(echo "$CHANGELOG_LINE" | sed 's/.*: //')
|
|
9
|
+
VERSION="$VERSION_NUM ($VERSION_DATE)"
|
|
10
|
+
else
|
|
11
|
+
VERSION="unknown"
|
|
12
|
+
fi
|
|
6
13
|
|
|
7
14
|
# Load configuration
|
|
8
15
|
# First check for local project config, then fall back to package default
|