Skip to content

Commit

Permalink
fix setup when the branch is not the default one
Browse files Browse the repository at this point in the history
fix a bug introduced in 832f725
this fix the deploy setup when the branch is different from the default one
  • Loading branch information
phra committed Jan 30, 2017
1 parent 95ed1e1 commit 603a4b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deploy
Expand Up @@ -201,12 +201,14 @@ hook_pre_setup() {
setup() {
local path=`config_get path`
local repo=`config_get repo`
local ref=`config_get ref`
local branch=${ref##*/}
hook_pre_setup || abort pre-setup hook failed
run "mkdir -p $path/{shared/{logs,pids},source}"
test $? -eq 0 || abort setup paths failed
log running setup
log cloning $repo
run "git clone --depth=5 $repo $path/source"
run "git clone --depth=5 --branch $branch $repo $path/source"
test $? -eq 0 || abort failed to clone
run "ln -sfn $path/source $path/current"
test $? -eq 0 || abort symlink failed
Expand Down

0 comments on commit 603a4b2

Please sign in to comment.