Skip to content

Instantly share code, notes, and snippets.

View edooley's full-sized avatar

Eric Dooley edooley

View GitHub Profile
@edooley
edooley / application.rb
Last active December 15, 2015 12:29
My approach to Rails app versioning. Keep up with your VCS tags and forget about the rest! (git shown here)
# Only attempt update on local machine
if Rails.env.development?
# Update version file from latest git tag
File.open('config/version', 'w') do |file|
file.write `git describe --tags --always` # or equivalent
end
end
config.version = File.read('config/version')