automated dev commit
This commit is contained in:
parent
49a94e586e
commit
9aba368f6c
1 changed files with 13 additions and 2 deletions
|
@ -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
|
if command -v eza &> /dev/null; then compdef eza=ls; fi
|
||||||
|
|
||||||
function dc() {
|
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 add .
|
||||||
git commit -m 'automated dev commit' --no-gpg-sign
|
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
||||||
git push
|
git commit -m "dev: automated commit - ${timestamp}" --no-gpg-sign
|
||||||
|
git push &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue