Skip to content

Commit

Permalink
Don't die if there is no media/revision.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmac committed Jan 29, 2015
1 parent 7209972 commit b5b3425
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/update/deploy_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def update_assets(ctx):
def update_revision_file(ctx):
"""Add a file containing the current git hash to media."""
with ctx.lcd(settings.SRC_DIR):
ctx.local("mv media/revision.txt media/prev-revision.txt")
ctx.local("if [ -f media/revision.txt ]; then "
"mv media/revision.txt media/prev-revision.txt; fi")
ctx.local("git rev-parse HEAD > media/revision.txt")


Expand Down

0 comments on commit b5b3425

Please sign in to comment.