Skip to content

Commit

Permalink
Changed branch setting to ref
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 8, 2011
1 parent e7f8b0b commit f681169
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 8 additions & 4 deletions Readme.md
Expand Up @@ -44,7 +44,7 @@
host n.n.n.n
repo git@github.com:visionmedia/express.git
path /var/www/myapp.com
branch origin/master
ref origin/master
post-deploy /var/www/myapp.com/update.sh

## Directives
Expand Down Expand Up @@ -79,11 +79,15 @@

path /var/www/myapp.com

### branch
### ref

GIT branch.
When specified, __HEAD__ is reset to `ref`. When deploying
production typically this will _not_ be used, as `deploy(1)` will
utilize the most recent tag by default, however this is useful
for a staging environment, as shown below where __HEAD__ is updated
and set to the develop branch.

branch origin/master
ref origin/develop

### Hooks

Expand Down
5 changes: 2 additions & 3 deletions bin/deploy
Expand Up @@ -152,7 +152,6 @@ hook() {
setup() {
local path=`config_get path`
local repo=`config_get repo`
local branch=`config_get branch`
run "mkdir -p $path/{shared/{logs,pids},source}"
test $? -eq 0 || abort 'setup paths failed'
log running setup
Expand Down Expand Up @@ -213,7 +212,7 @@ deploy() {
fi

# done
log deploy complete
log "successfully deployed $ref"
}

#
Expand Down Expand Up @@ -323,4 +322,4 @@ done
require_env

# deploy
deploy ${REF:-`config_get branch`}
deploy ${REF:-`config_get ref`}

0 comments on commit f681169

Please sign in to comment.