Sha256: 1ebf37a7fec292cdeba478de794e67526f4c5f7bb3665b5ff94b7570cc6161db

Contents?: true

Size: 1.45 KB

Versions: 2

Compression:

Stored size: 1.45 KB

Contents

# # NOTE:
# # Yes, you can deploy this project. It will deploy into the ./deploy/
# # directory.  The commands have been stubbed, so it's harmless. No rails or
# # bundler magic will happen.
#
# # ASSUMPTIONS:
# # - You have git installed. (of course you do)
# # - You have SSH enabled. In OS X, this is "Remote Login" under the Sharing pref pane.
# # - You have your own SSH key added to your own user so you can SSH to your own machine.
#
# # In fact, let's make that folder right now.
# require 'fileutils'
# FileUtils.mkdir_p "#{Dir.pwd}/deploy"
# FileUtils.mkdir_p "#{Dir.pwd}/deploy/config"
# File.open("#{Dir.pwd}/deploy/config/database.yml", 'w') { |f| f.write "Hello" }
#
# # -- Stubs end, deploy script begins! --------------
#

require 'mina/git'
require 'mina/rails'
# require 'pry'
#

set :domain, 'localhost'
set :deploy_to, "#{Dir.pwd}/deploy"
set :repository, "#{Mina.root_path}"
set :shared_paths, ['config/database.yml', 'log']
set :keep_releases, 2

task :environment do
  command 'eval "$(rbenv init -)"'
end
#
# desc "Deploys."
task deploy: :environment do
  deploy do
    invoke :'git:clone'
    invoke :'deploy:link_shared_paths'
    invoke :'bundle:install'
    invoke :'rails:db_migrate'
    invoke :'deploy:cleanup'

    on :launch do
      comment 'in launch'
    end
  end
end

desc 'Task description'
task :test do
  run :local do
    comment 'PWD'
    in_path('/Users') do
      command 'ls -al'
    end
    on :after do
      command 'pwd'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mina-1.0.0.beta2 test_env/config/deploy.rb
mina-1.0.0.beta1 test_env/config/deploy.rb