Skip to content
This repository was archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Add pre_update_latest_tag to fabfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonthomas committed Aug 19, 2013
1 parent 372cd49 commit 658da63
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,17 @@ def deploy():
cluster=settings.CLUSTER,
domain=settings.DOMAIN,
root=ROOT)


@task
def pre_update_latest_tag():
current_tag_file = os.path.join(FIREPLACE, '.tag')
latest_tag = helpers.git_latest_tag(FIREPLACE)
with open(current_tag_file, 'r+') as f:
if f.read() == latest_tag:
print 'Environemnt is at %s' % latest_tag
else:
pre_update(latest_tag)
f.seek(0)
f.write(latest_tag)
f.truncate()

0 comments on commit 658da63

Please sign in to comment.