Sha256: a5e4dfb7fec1aad9d3b4006f1ccc59b2695543cb488a6745335ae58d5bfb44ac

Contents?: true

Size: 1.13 KB

Versions: 14

Compression:

Stored size: 1.13 KB

Contents

#!/usr/bin/env ruby

#
# This script creates a file 'after_deploy.rb' in your config directory.   
# You should run it inside of your project directory.
#                                                      

Dir.mkdir "./config" if !File.directory? './config'
                                                    
config_file = File.open "./config/after_deploy.rb", "w"
raise "A error has been occured while trying to write to $(pwd)/config/after_deploy.rb. Not enough permission?" if config_file.nil?  

config_file.write %{#!/usr/bin/env ruby

#
# This script is launched by post-receive hook when push is completed.
# The general purpose of this script is to run bundler, migration and
# other commands that you want to launch after deployment.
#

require 'pushdeploy'

PushDeploy.new(ARGV) do
    bundle   
    migrate   
    run "touch #{@deploy_to}/tmp/restart.txt" 
end
}

puts "\n*************************************"
puts "\e[00;32mConfig has been successfully created!\e[00m"
puts "*************************************\n"

puts "You can edit " + `pwd`.chop + "/config/after_deploy.rb to add commands that you want to run after deployment.\n\n"

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
pushdeploy-0.0.17 bin/pushdeploy_create_config
pushdeploy-0.0.16 bin/pushdeploy_create_config
pushdeploy-0.0.15 bin/pushdeploy_create_config
pushdeploy-0.0.14 bin/pushdeploy_create_config
pushdeploy-0.0.13 bin/pushdeploy_create_config
pushdeploy-0.0.12 bin/pushdeploy_create_config
pushdeploy-0.0.10 bin/pushdeploy_create_config
pushdeploy-0.0.9 bin/pushdeploy_create_config
pushdeploy-0.0.8 bin/pushdeploy_create_config
pushdeploy-0.0.6 bin/pushdeploy_create_config
pushdeploy-0.0.5 bin/pushdeploy_create_config
pushdeploy-0.0.4 bin/pushdeploy_create_config
pushdeploy-0.0.3 bin/pushdeploy_create_config
pushdeploy-0.0.2 bin/pushdeploy_create_config