lib/capistrano/tasks/laravel.rake in capistrano-laravel-1.1.1 vs lib/capistrano/tasks/laravel.rake in capistrano-laravel-1.2.0
- old
+ new
@@ -15,10 +15,13 @@
set :laravel_migration_artisan_flags, "--force --env=#{fetch(:stage)}"
# The version of laravel being deployed
set :laravel_version, 5.3
+ # Whether to upload the dotenv file on deploy
+ set :laravel_upload_dotenv_file_on_deploy, true
+
# Which dotenv file to transfer to the server
set :laravel_dotenv_file, '.env'
# The user that the server is running under (used for ACLs)
set :laravel_server_user, 'www-data'
@@ -137,9 +140,11 @@
end
end
desc 'Upload dotenv file for release.'
task :upload_dotenv_file do
+ next unless fetch(:laravel_upload_env_file_on_deploy)
+
# Dotenv was introduced in Laravel 5
next if fetch(:laravel_version) < 5
dotenv_file = fetch(:laravel_dotenv_file)