Skip to content

Commit

Permalink
chore(extra files): updated makefile [2024-10-22]
Browse files Browse the repository at this point in the history
  • Loading branch information
CHRISCARLON committed Oct 22, 2024
1 parent 328df0f commit 32ca783
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
DATE := $(shell date +%Y-%m-%d)

COMMIT_TYPES := feat fix docs style refactor perf test build ci chore revert
define COMMIT_TYPES
feat: A new feature
fix: A bug fix
docs: Documentation only changes
style: Changes that do not affect the meaning of the code
refactor: A code change that neither fixes a bug nor adds a feature
perf: A code change that improves performance
test: Adding missing tests or correcting existing tests
build: Changes that affect the build system or external dependencies
ci: Changes to CI configuration files and scripts
chore: Other changes that don't modify src or test files
revert: Reverts a previous commit
endef
export COMMIT_TYPES

repo-update: git-add git-commit git-push

git-add:
git add .

git-commit:
@echo "Available commit types: $(COMMIT_TYPES)"
@echo "Available commit types:"
@echo "$$COMMIT_TYPES" | sed 's/^/ /'
@echo
@read -p "Enter commit type: " type; \
if echo "$(COMMIT_TYPES)" | grep -wq "$$type"; then \
if echo "$$COMMIT_TYPES" | grep -q "^$$type:"; then \
read -p "Enter commit scope (optional, press enter to skip): " scope; \
read -p "Enter commit message: " msg; \
if [ -n "$$scope" ]; then \
Expand Down

0 comments on commit 32ca783

Please sign in to comment.