@digitoimistodude/code-quality-checks 2.1.10 → 2.1.11
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/pre-commit +8 -7
- package/package.json +1 -1
package/.husky/pre-commit
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Pre commit hooks for Dude projects
|
|
2
2
|
# Ref: DEV-177, DEV-373, DEV-623
|
|
3
3
|
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
# Load configuration
|
|
5
|
+
# First check for local project config, then fall back to package default
|
|
6
|
+
SCRIPT_DIR="$(dirname "$0")"
|
|
7
|
+
|
|
8
|
+
# Version: dynamically read from code-quality-checks package CHANGELOG.md
|
|
9
|
+
PACKAGE_CHANGELOG="$SCRIPT_DIR/../CHANGELOG.md"
|
|
10
|
+
if [ -f "$PACKAGE_CHANGELOG" ]; then
|
|
11
|
+
CHANGELOG_LINE=$(head -n 1 "$PACKAGE_CHANGELOG")
|
|
7
12
|
VERSION_NUM=$(echo "$CHANGELOG_LINE" | sed 's/### //' | sed 's/:.*//')
|
|
8
13
|
VERSION_DATE=$(echo "$CHANGELOG_LINE" | sed 's/.*: //')
|
|
9
14
|
VERSION="$VERSION_NUM ($VERSION_DATE)"
|
|
10
15
|
else
|
|
11
16
|
VERSION="unknown"
|
|
12
17
|
fi
|
|
13
|
-
|
|
14
|
-
# Load configuration
|
|
15
|
-
# First check for local project config, then fall back to package default
|
|
16
|
-
SCRIPT_DIR="$(dirname "$0")"
|
|
17
18
|
if [ -f ".husky/pre-commit-config" ]; then
|
|
18
19
|
. ".husky/pre-commit-config"
|
|
19
20
|
elif [ -f "$SCRIPT_DIR/pre-commit-config" ]; then
|