-
Notifications
You must be signed in to change notification settings - Fork 14
/
gac-emojii.sh
73 lines (58 loc) · 1.59 KB
/
gac-emojii.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/zsh
function gac() {
if [ $# -eq 0 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
# displays help with
# gac | gac -h | gac --help
echo "------"
echo "Cannot commit without comments. Semantic reminder:"
echo "🐛 BUG FIX: b"
echo "📦 CHORE: c"
echo "📖 DOCS: d"
echo "✅ FEAT: f"
echo "🚀 NEW RELEASE: n"
echo "👌 IMPROVE: i"
echo "🪚 REFACTOR: r"
echo "🎨 STYLE: s"
echo "🧪 TEST: t"
echo "🛠 WORKING ON: w"
echo "------"
return 1
fi
SHORTCUT=$1
shift ;
COMMENT=$@
# Fix a bug
if [ "$SHORTCUT" = "b" ]; then
SHORTCUT="🐛 BUG FIX:"
# Chore
elif [ "$SHORTCUT" = "c" ]; then
SHORTCUT="📦 CHORE:"
# Write or edit existing documentation
elif [ "$SHORTCUT" = "d" ]; then
SHORTCUT="📖 DOCS:"
# Add new feature
elif [ "$SHORTCUT" = "f" ]; then
SHORTCUT="✅ FEAT:"
# Deploy in production
elif [ "$SHORTCUT" = "n" ]; then
SHORTCUT="🚀 NEW RELEASE:"
# Improve your code base
elif [ "$SHORTCUT" = "i" ]; then
SHORTCUT="👌 IMPROVE:"
# Refator your code base
elif [ "$SHORTCUT" = "r" ]; then
SHORTCUT="🪚 REFACTOR:"
# Styling actions
elif [ "$SHORTCUT" = "s" ]; then
SHORTCUT="🎨 STYLE:"
# Test your code
elif [ "$SHORTCUT" = "t" ]; then
SHORTCUT="🧪 TEST:"
# Working on a feature
elif [ "$SHORTCUT" = "w" ]; then
SHORTCUT="🛠 WORKING ON:"
fi
# res with or without semantic
git add -A && git commit -m "$SHORTCUT $COMMENT"
return 1
}