From ce7f07cb2da6abdf1244e1aae2fbd5ced7cc0c1b Mon Sep 17 00:00:00 2001 From: Andrew Dixon Date: Thu, 21 May 2026 00:08:04 -0700 Subject: [PATCH 1/6] Update Documentation that Claude Code Noticed --- lib/mix/tasks/init.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mix/tasks/init.ex b/lib/mix/tasks/init.ex index 0231696..9a79707 100644 --- a/lib/mix/tasks/init.ex +++ b/lib/mix/tasks/init.ex @@ -22,7 +22,7 @@ defmodule Mix.Tasks.Bootleg.Init do use Bootleg.DSL # Configure the following roles to match your environment. - # `build` defines what remote server your distillery release should be built on. + # `build` defines what remote server your release should be built on. # # Some available options are: # - `user`: ssh username to use for SSH authentication to the role's hosts @@ -38,7 +38,7 @@ defmodule Mix.Tasks.Bootleg.Init do use Bootleg.DSL # Configure the following roles to match your environment. - # `app` defines what remote servers your distillery release should be deployed and managed on. + # `app` defines what remote servers your release should be deployed and managed on. # # Some available options are: # - `user`: ssh username to use for SSH authentication to the role's hosts From eb42c713d02e05d429fa684193a460cb5ec06ae0 Mon Sep 17 00:00:00 2001 From: Andrew Dixon Date: Thu, 21 May 2026 00:34:43 -0700 Subject: [PATCH 2/6] Prompted Claude to create a plan to remove distillery --- lib/bootleg/tasks/build/docker.exs | 14 +++--- lib/bootleg/tasks/build/local.exs | 19 ++++--- lib/bootleg/tasks/build/remote.exs | 5 +- lib/mix/tasks/ping.ex | 2 +- lib/mix/tasks/restart.ex | 2 +- lib/mix/tasks/start.ex | 2 +- lib/mix/tasks/stop.ex | 2 +- test/fixtures/bootstraps/rel/config.exs | 48 ------------------ test/fixtures/build_me/mix.exs | 2 +- test/fixtures/build_me/rel/config.exs | 49 ------------------- test/fixtures/n00b/config/config.exs | 4 +- test/fixtures/n00b/mix.exs | 1 - test/fixtures/task_consumer/config/config.exs | 4 +- test/fixtures/task_consumer/mix.exs | 1 - test/fixtures/task_provider/config/config.exs | 4 +- 15 files changed, 27 insertions(+), 132 deletions(-) delete mode 100644 test/fixtures/bootstraps/rel/config.exs delete mode 100644 test/fixtures/build_me/rel/config.exs diff --git a/lib/bootleg/tasks/build/docker.exs b/lib/bootleg/tasks/build/docker.exs index f43ff19..4d630cf 100644 --- a/lib/bootleg/tasks/build/docker.exs +++ b/lib/bootleg/tasks/build/docker.exs @@ -62,14 +62,11 @@ task :docker_generate_release do docker_image = config(:docker_build_image) docker_mount = config({:docker_build_mount, "#{source_path}:/opt/build"}) docker_run_options = config({:docker_build_opts, []}) - release_args = config({:release_args, ["--quiet"]}) + release_args = config({:release_args, []}) + app_name = Config.app() UI.info("Generating release...") - commands = [ - ["mix", ["distillery.release"] ++ release_args] - ] - docker_args = [ "run", @@ -83,6 +80,11 @@ task :docker_generate_release do UI.debug("Docker command prefix:\n " <> Enum.join(docker_args, " ")) + commands = [ + ["mix", ["release"] ++ release_args], + ["bash", ["-c", "cd _build/#{mix_env}/rel && tar -czvf #{app_name}.tar.gz #{app_name}/"]] + ] + Enum.each(commands, fn [c, args] -> UI.info("[docker] #{c} " <> Enum.join(args, " ")) @@ -106,7 +108,7 @@ task :docker_copy_release do archive_path = Path.join( source_path, - "_build/#{mix_env}/rel/#{app_name}/releases/#{app_version}/#{app_name}.tar.gz" + "_build/#{mix_env}/rel/#{app_name}.tar.gz" ) local_archive_folder = Path.join([File.cwd!(), "releases"]) diff --git a/lib/bootleg/tasks/build/local.exs b/lib/bootleg/tasks/build/local.exs index 1847b54..abfc169 100644 --- a/lib/bootleg/tasks/build/local.exs +++ b/lib/bootleg/tasks/build/local.exs @@ -31,19 +31,18 @@ end task :local_generate_release do mix_env = config({:mix_env, "prod"}) source_path = config({:ex_path, File.cwd!()}) - release_args = config({:release_args, ["--quiet"]}) + release_args = config({:release_args, []}) + app_name = Config.app() UI.info("Generating release...") - commands = [ - ["mix", ["distillery.release"] ++ release_args] - ] - File.cd!(source_path, fn -> - Enum.each(commands, fn [c, args] -> - UI.info("[local] #{c} " <> Enum.join(args, " ")) - System.cmd(c, args, env: [{"MIX_ENV", mix_env}], into: IO.stream(:stdio, :line)) - end) + UI.info("[local] mix release " <> Enum.join(release_args, " ")) + System.cmd("mix", ["release"] ++ release_args, env: [{"MIX_ENV", mix_env}], into: IO.stream(:stdio, :line)) + + rel_dir = Path.join(source_path, "_build/#{mix_env}/rel") + UI.info("[local] tar -czvf #{app_name}.tar.gz #{app_name}/") + System.cmd("tar", ["-czvf", "#{app_name}.tar.gz", "#{app_name}/"], cd: rel_dir, into: IO.stream(:stdio, :line)) end) end @@ -56,7 +55,7 @@ task :local_copy_release do archive_path = Path.join( source_path, - "_build/#{mix_env}/rel/#{app_name}/releases/#{app_version}/#{app_name}.tar.gz" + "_build/#{mix_env}/rel/#{app_name}.tar.gz" ) local_archive_folder = Path.join([File.cwd!(), "releases"]) diff --git a/lib/bootleg/tasks/build/remote.exs b/lib/bootleg/tasks/build/remote.exs index 2ce4938..b78bb53 100644 --- a/lib/bootleg/tasks/build/remote.exs +++ b/lib/bootleg/tasks/build/remote.exs @@ -63,7 +63,7 @@ task :remote_generate_release do app_name = Config.app() release_args = - {:release_args, ["--quiet"]} + {:release_args, []} |> config() |> Enum.join(" ") @@ -108,8 +108,7 @@ task :copy_build_release do source_path = Path.join([ config({:ex_path, ""}), - "_build/#{mix_env}/rel/#{app_name}/releases/", - "#{app_version}/#{app_name}.tar.gz" + "_build/#{mix_env}/rel/#{app_name}.tar.gz" ]) dest_path = Path.join(release_workspace, "#{app_version}.tar.gz") diff --git a/lib/mix/tasks/ping.ex b/lib/mix/tasks/ping.ex index 9073f3c..16efb96 100644 --- a/lib/mix/tasks/ping.ex +++ b/lib/mix/tasks/ping.ex @@ -4,7 +4,7 @@ defmodule Mix.Tasks.Bootleg.Ping do @shortdoc "Pings an app." @moduledoc """ - Pings a deployed release using the `Distillery` helper. + Pings a deployed release. # Usage: diff --git a/lib/mix/tasks/restart.ex b/lib/mix/tasks/restart.ex index 87ca79c..e20a09b 100644 --- a/lib/mix/tasks/restart.ex +++ b/lib/mix/tasks/restart.ex @@ -4,7 +4,7 @@ defmodule Mix.Tasks.Bootleg.Restart do @shortdoc "Restarts a deployed release." @moduledoc """ - Restarts a deployed release using the `Distillery` helper. + Restarts a deployed release. # Usage: diff --git a/lib/mix/tasks/start.ex b/lib/mix/tasks/start.ex index 2fd2f9c..ce49b81 100644 --- a/lib/mix/tasks/start.ex +++ b/lib/mix/tasks/start.ex @@ -4,7 +4,7 @@ defmodule Mix.Tasks.Bootleg.Start do @shortdoc "Starts a deployed release." @moduledoc """ - Starts a deployed release using the `Distillery` helper. + Starts a deployed release. # Usage: diff --git a/lib/mix/tasks/stop.ex b/lib/mix/tasks/stop.ex index 8f86508..c6a5cf8 100644 --- a/lib/mix/tasks/stop.ex +++ b/lib/mix/tasks/stop.ex @@ -4,7 +4,7 @@ defmodule Mix.Tasks.Bootleg.Stop do @shortdoc "Stops a deployed release." @moduledoc """ - Stops a deployed release using the `Distillery` helper. + Stops a deployed release. # Usage: diff --git a/test/fixtures/bootstraps/rel/config.exs b/test/fixtures/bootstraps/rel/config.exs deleted file mode 100644 index bf283c9..0000000 --- a/test/fixtures/bootstraps/rel/config.exs +++ /dev/null @@ -1,48 +0,0 @@ -# Import all plugins from `rel/plugins` -# They can then be used by adding `plugin MyPlugin` to -# either an environment, or release definition, where -# `MyPlugin` is the name of the plugin module. -["rel", "plugins", "*.exs"] -|> Path.join() -|> Path.wildcard() -|> Enum.map(&Code.eval_file(&1)) - -use Distillery.Releases.Config, - # This sets the default release built by `mix distillery.release` - default_release: :default, - # This sets the default environment used by `mix distillery.release` - default_environment: Mix.env() - -# For a full list of config options for both releases -# and environments, visit https://hexdocs.pm/distillery/configuration.html - -# You may define one or more environments in this file, -# an environment's settings will override those of a release -# when building in that environment, this combination of release -# and environment configuration is called a profile - -environment :dev do - set(dev_mode: true) - set(include_erts: false) - set(cookie: :"Xlr3[j$4lk$rp7[n*h7}s7{kTT_Ng}mGsrzI;L.hWY7Eg)$m[gHrc};!T::f;Aj5") -end - -environment :prod do - set(include_erts: true) - set(include_src: false) - set(cookie: :"l0Qe@8dHJa1LODI)k3WwFCG`@%BR|MJzS5UNH_f8xIN`u1(]i1G|{*6OZqt1?C_X") -end - -# You may define one or more releases in this file. If you have not set a -# default release, or selected one when running `mix distillery.release`, -# the first release in the file will be used by default - -release :bootstraps do - set(version: current_version(:bootstraps)) - - set( - applications: [ - :runtime_tools - ] - ) -end diff --git a/test/fixtures/build_me/mix.exs b/test/fixtures/build_me/mix.exs index 7f5d0b6..12c54bb 100644 --- a/test/fixtures/build_me/mix.exs +++ b/test/fixtures/build_me/mix.exs @@ -30,6 +30,6 @@ defmodule BuildMe.Mixfile do # # Type "mix help deps" for more examples and options defp deps do - [{:distillery, "~> 2.1.0", runtime: false}] + [] end end diff --git a/test/fixtures/build_me/rel/config.exs b/test/fixtures/build_me/rel/config.exs deleted file mode 100644 index 644a453..0000000 --- a/test/fixtures/build_me/rel/config.exs +++ /dev/null @@ -1,49 +0,0 @@ -# credo:disable-for-this-file Credo.Check.Design.DuplicatedCode -# Import all plugins from `rel/plugins` -# They can then be used by adding `plugin MyPlugin` to -# either an environment, or release definition, where -# `MyPlugin` is the name of the plugin module. -["rel", "plugins", "*.exs"] -|> Path.join() -|> Path.wildcard() -|> Enum.map(&Code.eval_file(&1)) - -use Distillery.Releases.Config, - # This sets the default release built by `mix distillery.release` - default_release: :default, - # This sets the default environment used by `mix distillery.release` - default_environment: Mix.env() - -# For a full list of config options for both releases -# and environments, visit https://hexdocs.pm/distillery/configuration.html - -# You may define one or more environments in this file, -# an environment's settings will override those of a release -# when building in that environment, this combination of release -# and environment configuration is called a profile - -environment :dev do - set(dev_mode: true) - set(include_erts: false) - set(cookie: :"X4;[FrPc_I7ts,/Kv!b8/Ug]>_138CL/17Ars}Q!a>~32,X(p1Dd2|P]u}S:a`18") -end - -environment :prod do - set(include_erts: true) - set(include_src: false) - set(cookie: :"[7o)DJ]AnI4;eNDXgRk.%3$yjTi/JY{7ACZZ>b7kl(,OL3.w;MsPyjk3") -end - -# You may define one or more releases in this file. If you have not set a -# default release, or selected one when running `mix distillery.release`, -# the first release in the file will be used by default - -release :build_me do - set(version: current_version(:build_me)) - - set( - applications: [ - :runtime_tools - ] - ) -end diff --git a/test/fixtures/n00b/config/config.exs b/test/fixtures/n00b/config/config.exs index 4e96b4a..e5b866a 100644 --- a/test/fixtures/n00b/config/config.exs +++ b/test/fixtures/n00b/config/config.exs @@ -1,6 +1,4 @@ -# This file is responsible for configuring your application -# and its dependencies with the aid of the Mix.Config module. -use Mix.Config +import Config # This configuration is loaded before any dependency and is restricted # to this project. If another project depends on this project, this diff --git a/test/fixtures/n00b/mix.exs b/test/fixtures/n00b/mix.exs index 7bc3791..6ca2fc1 100644 --- a/test/fixtures/n00b/mix.exs +++ b/test/fixtures/n00b/mix.exs @@ -31,7 +31,6 @@ defmodule N00b.Mixfile do # Type "mix help deps" for more examples and options defp deps do [ - {:distillery, "~> 2.1.0", runtime: false}, {:bootleg, ">= 0.0.0", path: System.get_env("BOOTLEG_PATH"), runtime: false} ] end diff --git a/test/fixtures/task_consumer/config/config.exs b/test/fixtures/task_consumer/config/config.exs index 748218f..eddca40 100644 --- a/test/fixtures/task_consumer/config/config.exs +++ b/test/fixtures/task_consumer/config/config.exs @@ -1,6 +1,4 @@ -# This file is responsible for configuring your application -# and its dependencies with the aid of the Mix.Config module. -use Mix.Config +import Config # This configuration is loaded before any dependency and is restricted # to this project. If another project depends on this project, this diff --git a/test/fixtures/task_consumer/mix.exs b/test/fixtures/task_consumer/mix.exs index b855015..c5b9e4a 100644 --- a/test/fixtures/task_consumer/mix.exs +++ b/test/fixtures/task_consumer/mix.exs @@ -31,7 +31,6 @@ defmodule TaskConsumer.Mixfile do # Type "mix help deps" for more examples and options defp deps do [ - {:distillery, "~> 2.1.0", runtime: false}, {:task_provider, ">= 0.0.0", path: System.get_env("TASK_PROVIDER_PATH"), runtime: false}, {:bootleg, ">= 0.0.0", path: System.get_env("BOOTLEG_PATH"), runtime: false} ] diff --git a/test/fixtures/task_provider/config/config.exs b/test/fixtures/task_provider/config/config.exs index 4960574..9d2fc33 100644 --- a/test/fixtures/task_provider/config/config.exs +++ b/test/fixtures/task_provider/config/config.exs @@ -1,6 +1,4 @@ -# This file is responsible for configuring your application -# and its dependencies with the aid of the Mix.Config module. -use Mix.Config +import Config # This configuration is loaded before any dependency and is restricted # to this project. If another project depends on this project, this From 53e03b509181ed06c2d60b197100351225e617cf Mon Sep 17 00:00:00 2001 From: Andrew Dixon Date: Thu, 21 May 2026 14:12:28 -0700 Subject: [PATCH 3/6] Don't Use Verbose Output --- lib/bootleg/tasks/build/remote.exs | 6 ++++-- lib/bootleg/tasks/deploy.exs | 7 ++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/bootleg/tasks/build/remote.exs b/lib/bootleg/tasks/build/remote.exs index b78bb53..b099561 100644 --- a/lib/bootleg/tasks/build/remote.exs +++ b/lib/bootleg/tasks/build/remote.exs @@ -80,7 +80,8 @@ task :remote_generate_release do ]) remote :build, cd: source_path do - "tar -czvf #{app_name}.tar.gz #{app_name}/" + UI.info("Creating Tarball") + "tar -czf #{app_name}.tar.gz #{app_name}/" end end @@ -92,8 +93,9 @@ task :clean do |> Enum.join(" ") if locations != "" do + UI.info("Removing #{locations}...") remote :build do - "rm -rvf #{locations}" + "rm -rf #{locations}" end end end diff --git a/lib/bootleg/tasks/deploy.exs b/lib/bootleg/tasks/deploy.exs index 753b06f..3225594 100644 --- a/lib/bootleg/tasks/deploy.exs +++ b/lib/bootleg/tasks/deploy.exs @@ -45,11 +45,8 @@ end # task :unpack_release do remote_path = "#{Config.app()}.tar.gz" - UI.info("Unpacking release archive") - + UI.info("Unpacking release archive: #{remote_path}") remote :app do - "tar -zxvf #{remote_path}" + "tar -zxf #{remote_path}" end - - UI.info("Unpacked release archive") end From 39bad7272be228cdad977673a692a0c6fd5f630f Mon Sep 17 00:00:00 2001 From: Andrew Dixon Date: Thu, 21 May 2026 14:22:07 -0700 Subject: [PATCH 4/6] Add Lightning Bolts to UI Info Messages - makes the output surprisingly more readable. --- lib/bootleg/tasks/build/remote.exs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/bootleg/tasks/build/remote.exs b/lib/bootleg/tasks/build/remote.exs index b099561..1bd5375 100644 --- a/lib/bootleg/tasks/build/remote.exs +++ b/lib/bootleg/tasks/build/remote.exs @@ -43,7 +43,7 @@ task :compile do mix_env = config({:mix_env, "prod"}) source_path = config({:ex_path, ""}) - UI.info("Building on remote server with mix env #{mix_env}...") + UI.info("⚡ Building on remote server with mix env #{mix_env}...") remote :build, cd: source_path do "MIX_ENV=#{mix_env} mix local.rebar --force" @@ -67,7 +67,7 @@ task :remote_generate_release do |> config() |> Enum.join(" ") - UI.info("Generating release...") + UI.info("⚡ Generating release...") remote :build, cd: source_path do "MIX_ENV=#{mix_env} mix release #{release_args}" @@ -79,8 +79,8 @@ task :remote_generate_release do "/_build/#{mix_env}/rel/" ]) + UI.info("⚡ Creating Tarball...") remote :build, cd: source_path do - UI.info("Creating Tarball") "tar -czf #{app_name}.tar.gz #{app_name}/" end end @@ -93,7 +93,7 @@ task :clean do |> Enum.join(" ") if locations != "" do - UI.info("Removing #{locations}...") + UI.info("⚡ Removing #{locations}...") remote :build do "rm -rf #{locations}" end @@ -115,7 +115,7 @@ task :copy_build_release do dest_path = Path.join(release_workspace, "#{app_version}.tar.gz") - UI.info("Copying release archive to release workspace") + UI.info("⚡ Copying release archive to release workspace") remote :build do "mkdir -p #{release_workspace}" @@ -138,17 +138,17 @@ task :download_release do local_archive_folder = "#{File.cwd!()}/releases" local_path = Path.join(local_archive_folder, "#{app_version}.tar.gz") - UI.info("Downloading release archive") + UI.info("⚡ Downloading release archive") File.mkdir_p!(local_archive_folder) download(:build, remote_path, local_path) - UI.info("Saved: releases/#{app_version}.tar.gz") + UI.info("⚡ Saved: releases/#{app_version}.tar.gz") end task :reset_remote do refspec = config({:refspec, "master"}) - UI.info("Resetting remote hosts to refspec \"#{refspec}\"") + UI.info("⚡ Resetting remote hosts to refspec \"#{refspec}\"") remote :build do "git reset --hard #{refspec}" @@ -204,7 +204,7 @@ task :push_remote do false -> [] end - UI.info("Pushing new commits with git to: #{user_host_port}") + UI.info("⚡ Pushing new commits with git to: #{user_host_port}") case Git.push(["--tags", push_options, host_url, refspec], env: git_env) do {"", 0} -> @@ -296,7 +296,7 @@ task :pull_remote do "/home/#{build_role.user}/#{workspace}" end - UI.info("Pulling new commits with git from: #{repo_url}") + UI.info("⚡ Pulling new commits with git from: #{repo_url}") remote :build, cd: "#{repo_path}/#{Config.app()}.git" do "git remote set-url origin #{repo_url}" From 3dafee8494c9e89973e58f709c7cdbd2eb4e7f15 Mon Sep 17 00:00:00 2001 From: Andrew Dixon Date: Thu, 21 May 2026 15:48:11 -0700 Subject: [PATCH 5/6] Quiet Remote Output --- lib/bootleg/tasks/build/remote.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bootleg/tasks/build/remote.exs b/lib/bootleg/tasks/build/remote.exs index 1bd5375..746b210 100644 --- a/lib/bootleg/tasks/build/remote.exs +++ b/lib/bootleg/tasks/build/remote.exs @@ -48,8 +48,8 @@ task :compile do remote :build, cd: source_path do "MIX_ENV=#{mix_env} mix local.rebar --force" "MIX_ENV=#{mix_env} mix local.hex --if-missing --force" - "MIX_ENV=#{mix_env} mix deps.get --only=#{mix_env}" - "MIX_ENV=#{mix_env} mix do clean, compile --force" + "MIX_ENV=#{mix_env} mix deps.get --only=#{mix_env} 2>&1 | grep -E \"^\([Ee]rror\)\" || true" + "MIX_ENV=#{mix_env} mix do clean, compile --force 2>&1 | grep -E \"^\([Ee]rror\)\" || true" end end @@ -70,7 +70,7 @@ task :remote_generate_release do UI.info("⚡ Generating release...") remote :build, cd: source_path do - "MIX_ENV=#{mix_env} mix release #{release_args}" + "MIX_ENV=#{mix_env} mix release #{release_args} 2>&1 | grep -E \"^\([Ee]rror\)\" || true" end source_path = From 22e72ad14438e635ede8c1f8a2ad8ad2fd5d9d9d Mon Sep 17 00:00:00 2001 From: Andrew Dixon Date: Thu, 21 May 2026 16:09:53 -0700 Subject: [PATCH 6/6] Show Some Remote Output --- lib/bootleg/tasks/build/remote.exs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/bootleg/tasks/build/remote.exs b/lib/bootleg/tasks/build/remote.exs index 746b210..1fc1aa0 100644 --- a/lib/bootleg/tasks/build/remote.exs +++ b/lib/bootleg/tasks/build/remote.exs @@ -42,14 +42,15 @@ end task :compile do mix_env = config({:mix_env, "prod"}) source_path = config({:ex_path, ""}) + app_name = Config.app() UI.info("⚡ Building on remote server with mix env #{mix_env}...") remote :build, cd: source_path do "MIX_ENV=#{mix_env} mix local.rebar --force" "MIX_ENV=#{mix_env} mix local.hex --if-missing --force" - "MIX_ENV=#{mix_env} mix deps.get --only=#{mix_env} 2>&1 | grep -E \"^\([Ee]rror\)\" || true" - "MIX_ENV=#{mix_env} mix do clean, compile --force 2>&1 | grep -E \"^\([Ee]rror\)\" || true" + "MIX_ENV=#{mix_env} mix deps.get --only=#{mix_env} 2>&1 | grep -E \"^\(Resolving|[Ee]rror\)\" || true" + "MIX_ENV=#{mix_env} mix do clean, compile --force 2>&1 | grep -E \"^\(Generated #{app_name}|[Ee]rror\)\" || true" end end @@ -70,7 +71,7 @@ task :remote_generate_release do UI.info("⚡ Generating release...") remote :build, cd: source_path do - "MIX_ENV=#{mix_env} mix release #{release_args} 2>&1 | grep -E \"^\([Ee]rror\)\" || true" + "MIX_ENV=#{mix_env} mix release #{release_args} 2>&1 | grep -E \"^\(Generated|[Ee]rror\)\" || true" end source_path =