No commit activity in last 3 years
No release in over 3 years
lock set to deployed server for 1 day.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 2.15.6
 Project Readme

Capistrano::Deploylock

Gem Version Code Climate Dependency Status

lock set to deployed server for 1 day.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-deploylock'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-deploylock

Usage

add config/deploy.rb

require 'capistrano/deploylock'
before "deploy:lock:start", "deploy:lock:check"
before "deploy", "deploy:lock:start"

Why

  1. to ask people 'Can I deploy this server?', is almost Time-consuming.
  2. not ask peoble, but sever.
  3. no lockfile sets, you can always deploy. deployment runs quickly.

Feauture

  1. after you run cap deploy command, lockfile has set to deployed server, then anyone cannot deploy 24h except you.
  2. but cap deploy:lock:end command abort lock.
  3. when deploy, if lockfile exits,
  • it is maked by yourself, expired_at has update to 24h after by now.
  • it is not maked by yourself, expired_at not over current time, you can deploy.
  • it is not maked by yourself, expired_at over current time, you can deploy.

cmd

  • lock start
 % bundle exec cap $STAGE  deploy:lock:start
  • lock end
 % bundle exec cap $STAGE  deploy:lock:end
  • lock check
 % bundle exec cap $STAGE  deploy:lock:check

Contributing

  1. Fork it ( https://github.com/[my-github-username]/capistrano-deploylock/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request