Created
December 18, 2012 03:13
-
-
Save atabary/4324704 to your computer and use it in GitHub Desktop.
Simple fabric task that returns the current revision of a git repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import local | |
def current_revision(): | |
revision = local("git log -1 | grep commit | awk '{ print $2 }'", capture=True) | |
print 'current revision: %s' % revision | |
return revision |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment