From 536dd0629b2243cd1c1f4931ac2a9868bb5b088d Mon Sep 17 00:00:00 2001 From: Micah Cooper Date: Fri, 26 Aug 2016 08:29:03 -0500 Subject: [PATCH] Don't update nginx on upgrade --- README.md | 5 +---- lib/gatling/tasks/upgrade.ex | 10 ---------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/README.md b/README.md index 4feda1e..e8f9a7e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ $ ssh server.address Follow instructions [here](http://elixir-lang.org/install.html#unix-and-unix-like) to install elixir ```bash $ sudo apt-get install nginx -$ mix archive.install https://github.com/hashrocket/gatling_archives/raw/master/gatling-0.0.5.ez +$ mix archive.install https://github.com/hashrocket/gatling_archives/raw/master/gatling.ez ``` ### Deploying your app @@ -153,9 +153,6 @@ defmodule SampleProject.UpgradeCallbacks do def before_upgrade_service(env) def after_upgrade_service(env) - def before_configure_nginx(env) - def after_configure_nginx(env) - end ``` diff --git a/lib/gatling/tasks/upgrade.ex b/lib/gatling/tasks/upgrade.ex index 8d8c805..bd124e9 100644 --- a/lib/gatling/tasks/upgrade.ex +++ b/lib/gatling/tasks/upgrade.ex @@ -16,7 +16,6 @@ defmodule Mix.Tasks.Gatling.Upgrade do |> call(:make_upgrade_dir) |> call(:copy_release_to_upgrade) |> call(:upgrade_service) - |> call(:configure_nginx) end def mix_deps_get(env) do @@ -49,15 +48,6 @@ defmodule Mix.Tasks.Gatling.Upgrade do env end - def configure_nginx(%{nginx_available_path: available, nginx_enabled_path: enabled} = env) do - if env.domains do - File.write!(available, env.nginx_template) - unless File.exists?(enabled), do: File.ln_s(available, enabled) - bash("nginx", ~w[-s reload]) - end - env - end - def upgrade_service(env) do bash("service", ~w[#{env.project} upgrade #{env.version}], []) env