smart commit, actually smart now
continuous-integration/drone/push Build is failing Details

main
Nick Dumas 2 years ago
parent 88966297ac
commit 1aac2f1afb

@ -1,10 +1,14 @@
#! /bin/sh #! /bin/sh
set -e -u -o pipefail
cd /tmp/blog/
STATUS=$(git status --porcelain) STATUS=$(git status --porcelain)
STATUS_LEN=${#STATUS} STATUS_LEN=${#STATUS}
if [ $STATUS_LEN = 0 ]; then if [[ $STATUS_LEN -eq 0 ]]
then
exit 0 exit 0
else else
git add . git add content/*
git commit -qm "CI/CD Commit: $(date -Iseconds)" git commit -m "CI/CD Commit: $(date -Iseconds)"
git push origin main
fi fi

Loading…
Cancel
Save