feat(bin): move bash scripts

This commit is contained in:
Devon Tingley 2022-07-30 14:46:12 -04:00
parent d904e8654b
commit 64e262721c
2 changed files with 17 additions and 0 deletions

17
bin/commit.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
TYPE=$(gum choose "fix" "feat" "docs" "ci" "style" "refactor" "test" "chore" "revert")
SCOPE=$(gum input --placeholder "scope")
test -n "$SCOPE" && SCOPE="($SCOPE)"
TO_COMMIT=$(gum choose --no-limit $(git ls-files --modified --others --exclude-standard))
SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "Commit Summary")
DESCRIPTION=$(gum write --placeholder "Details of this change...")
gum confirm "Commit?"
if [[ "$?" -eq 0 ]]; then
git add $TO_COMMIT;
git commit -m "$SUMMARY" -m "$DESCRIPTION";
fi