https://github.com/amarshall/vlad-version.git
Vlad tasks for creating a version file and version tag upon deploy so itβs seamless and easy to keep track of what is deployed where.
Add this line to your application's Gemfile:
gem 'vlad-version', :require => false
And then execute:
$ bundle
Or install it yourself as:
$ gem install vlad-version
Then add to your config/deploy.rb:
require 'vlad/version'
Two tasks are provided that you can add into your existing deploy task(s):
vlad:version:file which creates a file in#{shared_path}/#{version_file_path} with the date of the deploy and the Git
revision deployed.
vlad:version:tag which creates a Git tag with the name#{environment}_#{release_time} containing the environment deployed to, time
of deploy, and who deployed.
The following variables are available:
| Variable | Default value |
|---|---|
release_time |
Time.now.utc |
signversiontag |
false |
versionfilepath |
"/system/version.txt" |
In order to ensure release_time is consistent with Vladβs release_name,
release_name is set to release_time.strftime('%Y%m%d%H%M%S'), which
maintains the same format as Vladβs default. If you override release_name to
another time-based format, you should use release_time as your source time to maintain consistency.
If the environment variable is set in your deploy configuration, it will be prefixed onto the Git tag name.
Contributions are welcome. Please be sure that your pull requests are atomic so they can be considered and accepted separately.
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)Copyright Β© 2012 J. Andrew Marshall. All rights reserved. License is available in the LICENSE file.