Skip to content

Instantly share code, notes, and snippets.

@danielpietzsch
Created September 15, 2010 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpietzsch/580061 to your computer and use it in GitHub Desktop.
Save danielpietzsch/580061 to your computer and use it in GitHub Desktop.
Put this in environment.rb and use the constant to display the version number wherever you like
APP_VERSION = `git describe --always`.strip unless defined? APP_VERSION
@danielpietzsch
Copy link
Author

Of course, this only works if you use git tags as your version system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment