From cde640a16e98daa7982166986049e0996896dce5 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Mon, 19 Jul 2021 17:56:04 -0500 Subject: [PATCH] Enhance scm-dev.sh to allow specific branch requests. --- tasks/general/scripts/root.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tasks/general/scripts/root.yml b/tasks/general/scripts/root.yml index 281ee0c..94681e8 100644 --- a/tasks/general/scripts/root.yml +++ b/tasks/general/scripts/root.yml @@ -43,8 +43,21 @@ path: "{{ user_root.home }}/bin/scm-dev.sh" block: | # 20210713 - Make life easier for development! + + ## Variables ## + + # Use a specific branch if it was asked for. + branch="dev" + if [[ $1 != "" ]]; then + branch="$1" + fi + + + ## Main ## + push.sh - {{ ansible_pull_exec.stdout }} -U https://github.com/Hyperling/ansible.git --checkout dev + time {{ ansible_pull_exec.stdout }} -U https://github.com/Hyperling/ansible.git --checkout $branch + marker: '{mark}' marker_begin: "#!{{ bash_exec.stdout }}" marker_end: "exit 0"