Skip to content

Instantly share code, notes, and snippets.

@MosesMendoza
Created January 17, 2013 21:11
Show Gist options
  • Save MosesMendoza/4559778 to your computer and use it in GitHub Desktop.
Save MosesMendoza/4559778 to your computer and use it in GitHub Desktop.
# @pe_version is obtained by the branch we're on
# We want the latest tag on *our* branch
tag = %x{git tag | grep "#{@pe_version}"}.split.sort.last
commits = %x{git log --pretty=format:'%h' #{tag}.. | wc -l}.chomp
hash = %x{git show HEAD --pretty=format:'%h'}
tarball_version="#{tag}-#{commits}-#{hash}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment