-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dev-ahmadbilal/main
Main
- Loading branch information
Showing
6 changed files
with
40 additions
and
21 deletions.
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit "$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 |
---|---|---|
@@ -1,23 +1,30 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# Run linting | ||
npm run lint | ||
|
||
echo "Linting passed. Proceeding with the unit tests." | ||
# Get the list of changed files in the commit | ||
CHANGED_FILES=$(git diff --cached --name-only) | ||
|
||
# Check if any of the changed files are under the `src` folder | ||
if echo "$CHANGED_FILES" | grep -q '^src/'; then | ||
echo "Changes detected in the src folder. Running unit tests..." | ||
|
||
# Run islam.js unit tests | ||
echo "Running islam.js unit tests..." | ||
npm run test | ||
|
||
# Run NestJS unit tests | ||
echo "Running NestJS unit tests..." | ||
npm run test | ||
# Capture the exit code of the tests | ||
TEST_RESULT=$? | ||
|
||
# Capture the exit code of the tests | ||
TEST_RESULT=$? | ||
# Check if tests passed | ||
if [ $TEST_RESULT -ne 0 ]; then | ||
echo "Tests failed. Please fix the issues before committing." | ||
exit $TEST_RESULT | ||
fi | ||
|
||
# Check if tests passed | ||
if [ $TEST_RESULT -ne 0 ]; then | ||
echo "Tests failed. Please fix the issues before committing." | ||
exit $TEST_RESULT | ||
echo "Tests passed. Proceeding with the commit." | ||
else | ||
echo "No changes detected in the src folder. Skipping unit tests." | ||
fi | ||
|
||
echo "Tests passed. Proceeding with the commit." | ||
exit 0 | ||
exit 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run build |
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,16 @@ | ||
# 1.0.0 (2024-08-30) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* disable commit lint from semantic releae commits ([8ccbfe7](https://github.com/dev-ahmadbilal/islam.js/commit/8ccbfe7bddd5f7c6f32353e013e851258501cf08)) | ||
* remove deprecated commands from husky hooks ([dff2059](https://github.com/dev-ahmadbilal/islam.js/commit/dff205931d94de346adc516de8cc0ba2f2b2541b)) | ||
* update lin script command ([53c39af](https://github.com/dev-ahmadbilal/islam.js/commit/53c39affc0723f288c43d0f0df16dc22b969a9b5)) | ||
* update pre commit hook to skip test for outside src changes ([4e11105](https://github.com/dev-ahmadbilal/islam.js/commit/4e11105c6f9ef8b8e46cdaf8bab6052ccadfba5b)) | ||
|
||
|
||
### Features | ||
|
||
* **assets:** added pkg assets ([727306b](https://github.com/dev-ahmadbilal/islam.js/commit/727306b493d306bae278c1d28c12601b8970a9e5)) | ||
* **classes:** add service classes ([27a3944](https://github.com/dev-ahmadbilal/islam.js/commit/27a39444f5b84f0b047143993538796aeab9dfb9)) | ||
* **types:** added pkg types ([8d7f757](https://github.com/dev-ahmadbilal/islam.js/commit/8d7f757c1639f8376e95b90ae78adbbb5e8a9e3f)) |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
ignores: [(commit) => commit.includes('[skip ci]')], | ||
}; |
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