automated dev commit

This commit is contained in:
Mariano Z. 2025-05-10 21:33:40 -03:00
parent 49a94e586e
commit 9aba368f6c

View file

@ -301,7 +301,18 @@ if command -v bombadil &> /dev/null; then eval "$(bombadil generate-completions
if command -v eza &> /dev/null; then compdef eza=ls; fi
function dc() {
if ! git rev-parse --is-inside-work-tree &>/dev/null; then
echo "Error: Not in a git repository"
return 1
fi
if [[ -z $(git status --porcelain) ]]; then
echo "No changes to commit"
return 0
fi
git add .
git commit -m 'automated dev commit' --no-gpg-sign
git push
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
git commit -m "dev: automated commit - ${timestamp}" --no-gpg-sign
git push &>/dev/null
}