πŸ“¦ amarshall / vlad-version

β˜… 1 stars β‘‚ 0 forks πŸ‘ 1 watching βš–οΈ MIT License
πŸ“₯ Clone https://github.com/amarshall/vlad-version.git
HTTPS git clone https://github.com/amarshall/vlad-version.git
SSH git clone git@github.com:amarshall/vlad-version.git
CLI gh repo clone amarshall/vlad-version
Andrew Marshall Andrew Marshall v0.0.2 45d3fcb 13 years ago πŸ“ History
πŸ“‚ master View all commits β†’
πŸ“ lib
πŸ“„ .gitignore
πŸ“„ Gemfile
πŸ“„ LICENSE.txt
πŸ“„ Rakefile
πŸ“„ README.md
πŸ“„ README.md

Vlad Version

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.

Installation

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

Usage

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.

Contributing

Contributions are welcome. Please be sure that your pull requests are atomic so they can be considered and accepted separately.

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Credits & License

Copyright Β© 2012 J. Andrew Marshall. All rights reserved. License is available in the LICENSE file.