-
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.
chore(extra files): added makefile with convetional commits process […
…2024-10-22]
- Loading branch information
1 parent
2efb718
commit 328df0f
Showing
1 changed file
with
27 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
DATE := $(shell date +%Y-%m-%d) | ||
|
||
COMMIT_TYPES := feat fix docs style refactor perf test build ci chore revert | ||
|
||
repo-update: git-add git-commit git-push | ||
|
||
git-add: | ||
git add . | ||
|
||
git-commit: | ||
@echo "Available commit types: $(COMMIT_TYPES)" | ||
@read -p "Enter commit type: " type; \ | ||
if echo "$(COMMIT_TYPES)" | grep -wq "$$type"; then \ | ||
read -p "Enter commit scope (optional, press enter to skip): " scope; \ | ||
read -p "Enter commit message: " msg; \ | ||
if [ -n "$$scope" ]; then \ | ||
git commit -m "$$type($$scope): $$msg [$(DATE)]"; \ | ||
else \ | ||
git commit -m "$$type: $$msg [$(DATE)]"; \ | ||
fi; \ | ||
else \ | ||
echo "Invalid commit type. Please use one of the available types."; \ | ||
exit 1; \ | ||
fi | ||
|
||
git-push: | ||
git push |