From 491587eee258f28858a01ba8980212015b838234 Mon Sep 17 00:00:00 2001 From: ekimia Date: Thu, 26 Dec 2019 01:02:44 +0100 Subject: [PATCH 1/3] add -t param to provision clone + param check --- utils/provision | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/provision b/utils/provision index eb9d772..ca5d01d 100755 --- a/utils/provision +++ b/utils/provision @@ -32,6 +32,7 @@ read -r -d '' usage <<-'EOF' -i Configure OpenDKIM. -c Configures DNS on Namecheap. -d Enables debug mode + -t Checkout a specific tag or branch -h This page EOF @@ -103,7 +104,7 @@ function buy_domain_name () { } function application () { - git clone https://${arg_a}.git /data/domains/${arg_u} + git clone https://${arg_a}.git /data/domains/${arg_u} -t ${arg_t} cd /data/domains/${arg_u} if [ -f ./scripts/install ]; then export URL=${arg_u} @@ -201,6 +202,8 @@ fi [ -z "${arg_u}" ] && help "URL is required." [ -z "${LOG_LEVEL}" ] && emergency "Cannot continue without LOG_LEVEL." +# tags/branch for modules +[ -z "${arg_t}" ] && arg_t=master ### Runtime -- GitLab From 633bab6358c9f0628f8b071670716f14362388f8 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Fri, 27 Mar 2020 15:48:11 +0100 Subject: [PATCH 2/3] comments --- utils/provision | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/provision b/utils/provision index ca5d01d..2f6a4ad 100755 --- a/utils/provision +++ b/utils/provision @@ -26,11 +26,11 @@ LOG_LEVEL="${LOG_LEVEL:-6}" # 7 = debug -> 0 = emergency # opts & defaults from. The parsing is unforgiving so be precise in your syntax read -r -d '' usage <<-'EOF' -u [arg] URL to process. Required. - -a [arg] Application to install. (in the form github.com/indiehosters/wordpress) + -a [arg] Application to install. (in the form github.com/indiehosters/wordpress or wordpress in REPO_MODE) -s Start the application right away. -b Buys the associated domain name. -i Configure OpenDKIM. - -c Configures DNS on Namecheap. + -c Configures DNS if possible. -d Enables debug mode -t Checkout a specific tag or branch -h This page -- GitLab From a1587b03f080934f2b2a49f99176c67193f11323 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Thu, 2 Apr 2020 18:24:37 +0200 Subject: [PATCH 3/3] final : add the -t param in the usage --- utils/provision | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/provision b/utils/provision index d8dfac6..af27200 100755 --- a/utils/provision +++ b/utils/provision @@ -27,12 +27,12 @@ LOG_LEVEL="${LOG_LEVEL:-6}" # 7 = debug -> 0 = emergency read -r -d '' usage <<-'EOF' -u [arg] URL to process. Required. -a [arg] Application to install. (in the form github.com/indiehosters/wordpress or wordpress in REPO_MODE) + -t [arg] Checkout a specific tag or branch from the application repo. default to master -s Start the application right away. -b Buys the associated domain name. -i Configure OpenDKIM. -c Configures DNS if possible. -d Enables debug mode - -t Checkout a specific tag or branch -h This page EOF @@ -117,7 +117,7 @@ function application () { #Define the tag/branch - if [ -z ${arg_t:-} ]; then + if [ "${arg_t}" = "1" ]; then warning "No tag/branch specified, Using master " git_tag=master else -- GitLab