Skip to content

Commit 4bd6846

Browse files
committed
Use hex archive path without -otp-MAJOR
1 parent 75f9cb3 commit 4bd6846

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

rel/app/standalone.exs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,23 @@ defmodule Standalone do
112112
File.mkdir_p!(release_archives_dir)
113113

114114
hex_version = Keyword.fetch!(Application.spec(:hex), :vsn)
115-
source_hex_path = Path.join(Mix.path_for(:archives), "hex-#{hex_version}-otp-#{System.otp_release()}")
116-
release_hex_path = Path.join(release_archives_dir, "hex-#{hex_version}-otp-#{System.otp_release()}")
115+
116+
source_hex_path =
117+
Path.join(Mix.path_for(:archives), "hex-#{hex_version}-otp-#{System.otp_release()}")
118+
119+
# TODO: Handling both paths for now, need to investigate why this broke.
120+
source_hex_path =
121+
if File.exists?(source_hex_path) do
122+
source_hex_path
123+
else
124+
path = Path.join(Mix.path_for(:archives), "hex-#{hex_version}")
125+
Mix.shell().info("warning: #{source_hex_path} not found")
126+
path
127+
end
128+
129+
release_hex_path =
130+
Path.join(release_archives_dir, "hex-#{hex_version}-otp-#{System.otp_release()}")
131+
117132
cp_r!(source_hex_path, release_hex_path)
118133

119134
release

0 commit comments

Comments
 (0)