diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-11-22 10:23:36 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-11-22 10:23:36 -0500 |
commit | 19861b89e60097385b046690204b6b0d3397052d (patch) | |
tree | 0d344392c0537ffba7f3cc71152e2c878c329f12 | |
parent | 4fe95f44f002a0399f8e31a93e9425edf40a9671 (diff) | |
download | emacsconf-ansible-19861b89e60097385b046690204b6b0d3397052d.tar.xz emacsconf-ansible-19861b89e60097385b046690204b6b0d3397052d.zip |
update task status
-rwxr-xr-x | roles/prerec/templates/update-task-status.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/roles/prerec/templates/update-task-status.sh b/roles/prerec/templates/update-task-status.sh index d2500e1..e8f0ff8 100755 --- a/roles/prerec/templates/update-task-status.sh +++ b/roles/prerec/templates/update-task-status.sh @@ -1,10 +1,21 @@ #!/bin/bash # {{ ansible_managed }} +# How to use: update-task-status.sh slug from-status-regexp to-status +# or update-task-status.sh slug to-status + SLUG="$1" FROM_STATUS="$2" TO_STATUS="$3" +if [ "x$TO_STATUS" == "x" ]; then + FROM_STATUS=. + TO_STATUS="$2" +fi cd {{ emacsconf_private_dir }} +echo "Pulling conf.org..." git pull +echo "Updating status..." emacsclient -a emacs --eval "(emacsconf-with-todo-hooks (emacsconf-update-talk-status \"$SLUG\" \"$FROM_STATUS\" \"$TO_STATUS\"))" +echo "Committing and pushing in the background" git commit -m "Update task status for $SLUG from $FROM_STATUS to $TO_STATUS" conf.org -git push +git push & + |