Giter VIP home page Giter VIP logo

capistrano-detect-migrations's Introduction

Capistrano Detect Migrations

This plugin to Capistrano leverages the capistrano-deploytags plugin to have Git identify Rails migrations before you deploy code to any remote systems. This is handy in an environment where you deploy often and want to release the newest code but only if it's not complicated by running migrations. You may also just want a list of migrations that will need to be run before deploying and this plugin makes that easy.

What It Does

It makes it automatic to detect pending migrations in any environment. You won't be surprised by deploying code that doesn't work until the migrations have been run. If I were to issue the command:

cap production deploy

This would compare the current changes with the most recent deployment tag for the environment (here: production) and look for any migrations that have appeared or changed in the code since the last run. You are then presented with a prompt allowing you to cancel the deployment after reviewing the list of migrations.

Usage

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

gem install capistrano-detect-migrations

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

require 'capistrano-detect-migrations'

This will create one task that hooks into one of the tasks installed by the capistrano-deploytags gem. You can always review tasks that have been added by running cap -T from your application directory.

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.

capistrano-detect-migrations's People

Contributors

gavinheavyside avatar liveh2o avatar relistan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

capistrano-detect-migrations's Issues

Allow lowercase letters

Thanks for the handy gem. One thing that would be helpful would be to allow lowercase letters during input. Right now, typing either "y" or "n" aborts the deployment. Only typing "Y" allows it to continue.

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.