Git Product home page Git Product logo

capistrano-deploytags's Introduction

Capistrano Deployment Tags

This plugin to Capistrano will add a timestamped Git tag at each deployment, automatically. It is intended to be used with the multistage recipe and will tag each release by environment. You can, however, use it without multistage simply by setting :branch and :stage in your recipe.

What It Does

Simply: it makes it so you can track your deployments from Git. If I were to issue the command:

cap production deploy

This would result in one new git tag with the environment and timestamp:

production-2012.04.02-203155

These tags can be used for any number of useful things including generating statistics about deployments per day/week/year, tracking code size over a period of time, detecting Rails migrations, and probably a thousand other things I haven't thought of.

Usage

capistrano-deploytags is available on rubygems.org. You can install it from there with:

gem install capistrano-deploytags

If you use Bundler, be sure to add the gem to your Gemfile. In your Capistrano config/deploy.rb you should add:

require 'capistrano-deploytags'

This will create two tasks, one that runs before deployment and one that runs after.

NOTE: You will be creating and pushing tags from the version of the code in the current checkout. This plugin needs to be run from a clean checkout of your codebase. You should be deploying from a clean checkout anyway, so in most cases this is not a restriction on how you already do things. The plugin will check if your code is clean and complain if it is not.

Helpful Git Config

You might find it useful to add this to your ~/.gitconfig in order to get a nice history view of the commits and tags.

[alias]
   lol = log --pretty=oneline --abbrev-commit --graph --decorate

You can then view the list by typing git lol from the checked out code path.

Credits

This software was written by Karl Matthias with help from Gavin Heavyside and the support of MyDrive Solutions Limited.

License

This plugin is released under the BSD two clause license which is available in both the Ruby Gem and the source repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.