Commit 11185c4a authored by Michel Memeteau's avatar Michel Memeteau

Merge branch '174-handle-git-branches-when-provisioning' into 'develop'

Resolve "Handle git branches when provisioning"

See merge request !185
parents 48c0cbb4 a1587b03
......@@ -26,11 +26,12 @@ 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
-a [arg] Application to install. (in the form 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 on Namecheap.
-c Configures DNS if possible.
-d Enables debug mode
-h This page
......@@ -113,9 +114,19 @@ function application () {
warning "REPO specified, using argument as app name"
#Define the tag/branch
if [ "${arg_t}" = "1" ]; then
warning "No tag/branch specified, Using master "
git clone ${git_url} -b ${arg_t} /data/domains/${arg_u}
git clone ${git_url} /data/domains/${arg_u}
cd /data/domains/${arg_u}
if [ -f ./scripts/install ]; then
export URL=${arg_u}
if [ -z ${MAIL_DOMAIN:-} ]; then
......@@ -212,6 +223,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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment