mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
Run notes:push steps only if there are changes
This commit is contained in:
@@ -46,9 +46,11 @@ tasks:
|
||||
notes:push:
|
||||
desc: Commit and push changes to notes submodule
|
||||
dir: '{{.NOTES_DIR}}'
|
||||
preconditions:
|
||||
- sh: git add NOTES.md && ! git diff --cached --quiet
|
||||
msg: "No changes to commit"
|
||||
cmds:
|
||||
- git add NOTES.md
|
||||
- git diff --cached --quiet || git commit -m "Update notes - $(date '+%Y-%m-%d %H:%M')"
|
||||
- git commit -m "Update notes - $(date '+%Y-%m-%d %H:%M')"
|
||||
- git push
|
||||
silent: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user