Sha256: 7bc888140ec07e3f4ec32545608a7cd9b3b584a64a8344461c19c1982f8c4e89

Contents?: true

Size: 579 Bytes

Versions: 10

Compression:

Stored size: 579 Bytes

Contents

namespace :server do
  SERVER = "USER_NAME@SERVER_NAME"
  PORT = "PORT_NUMBER"
  SSH = "-p#{PORT} #{SERVER}"
  SERVER_DIR = '/home/www/PROJECT_DIR'

  desc "Uploads to #{SERVER} server"
  task :upload => :environment do

    puts "Really upload to \033[0;37m#{SERVER_DIR}\033[0;32m ?"
    STDIN.gets

    puts 'Pull from git'
    `git pull`

    puts 'Push to git'
    `git push`

    print 'Assets change? '
    puts change_assets = !!(`git diff --name-only HEAD^` =~ /assets/)

    system %Q(ssh -t #{SSH} "source .zshrc && deploy.sh #{SERVER_DIR} #{change_assets}")
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
r5-0.1.9 lib/r5/template/lib/tasks/upload.rake
r5-0.1.8 lib/r5/template/lib/tasks/upload.rake
r5-0.1.7 lib/r5/template/lib/tasks/upload.rake
r5-0.1.6 lib/r5/template/lib/tasks/upload.rake
r5-0.1.5 lib/r5/template/lib/tasks/upload.rake
r4-0.1.5 lib/r4/template/lib/tasks/upload.rake
r4-0.1.4 lib/r4/template/lib/tasks/upload.rake
r4-0.1.3 lib/r4/template/lib/tasks/upload.rake
r4-0.1.2 lib/r4/template/lib/tasks/upload.rake
r4-0.1.1 lib/r4/template/lib/tasks/upload.rake