Skip to content

Commit

Permalink
chore(extra files): added makefile with convetional commits process […
Browse files Browse the repository at this point in the history
…2024-10-22]
  • Loading branch information
CHRISCARLON committed Oct 22, 2024
1 parent 2efb718 commit 328df0f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions makefile
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

0 comments on commit 328df0f

Please sign in to comment.