Sha256: dd7e92a05906aee82806334b78d43bb2c7757c029759934fbf65f8dfe246c9c7

Contents?: true

Size: 745 Bytes

Versions: 1

Compression:

Stored size: 745 Bytes

Contents

namespace :env do
  desc <<-DESC
    Upload env file to the server

    You can override any of these defaults by setting the variables shown below.

    set :env_file, ".env"
    set :target_file, -> { shared_path.join('.env') }
  DESC
  task :upload do
    on roles(:app) do
      upload! fetch(:env_file), fetch(:env_target), via: :scp
    end
  end

  desc <<-DESC
    Symlink the .env file to the release_path
  DESC
  task :symlink do
    on roles(:app) do
      execute :ln, "-sf #{fetch(:env_target)} #{release_path.join('.env')}"
    end
  end
end

namespace :load do
  task :defaults do
    set :env_file, ".env"
    set :env_target, -> { shared_path.join('.env') }
  end
end

namespace :deploy do
  after :updating, 'env:symlink'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mascherano-1.0.0 lib/mascherano/tasks/env.cap