File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,23 @@ function restore_app() {
1414function copy_hex() {
1515 mkdir -p ${build_path} /.mix/archives
1616 mkdir -p ${build_path} /.hex
17- hex_file=` basename ${hex_source:- hex-* .ez} `
1817
19- # For older versions of hex which have no version name in file
20- if [ -z " $hex_file " ]; then
21- hex_file=" hex.ez"
18+ if [ -n " $hex_source " ]; then
19+ hex_file=` basename ${hex_source} `
20+ else
21+ # hex file names after elixir-1.1 in the hex-<version>.ez form
22+ full_hex_file_path=$( ls -t ${HOME} /.mix/archives/hex-* .ez | head -n 1)
23+
24+ # For older versions of hex which have no version name in file
25+ if [ -z " $full_hex_file_path " ]; then
26+ full_hex_file_path=${HOME} /.mix/archives/hex.ez
27+ fi
2228 fi
2329
2430 cp ${HOME} /.hex/registry.ets ${build_path} /.hex/
25-
26- output_section " Copying hex from $hex_file "
27- cp ${HOME} /.mix/archives/ ${hex_file} ${build_path} /.mix/archives
31+
32+ output_section " Copying hex from $full_hex_file_path "
33+ cp $full_hex_file_path ${build_path} /.mix/archives
2834}
2935
3036
You can’t perform that action at this time.
0 commit comments