From 5af2cf8871f7d27d61806e299542e57e64012029 Mon Sep 17 00:00:00 2001 From: Raymond Wang <14915548+wchengru@users.noreply.github.com> Date: Mon, 26 Apr 2021 08:33:36 -0700 Subject: [PATCH 1/5] chore: add command line options to pyinstaller build script --- installer/pyinstaller/build-linux.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/installer/pyinstaller/build-linux.sh b/installer/pyinstaller/build-linux.sh index 09c8f20591b..2f0dcade7f2 100644 --- a/installer/pyinstaller/build-linux.sh +++ b/installer/pyinstaller/build-linux.sh @@ -2,7 +2,8 @@ binary_zip_filename=$1 python_library_zip_filename=$2 python_version=$3 -nightly_build=$4 +build_binary_name=$4 +build_folder=$5 if [ "$python_library_zip_filename" = "" ]; then python_library_zip_filename="python-libraries.zip"; @@ -12,8 +13,8 @@ if [ "$python_version" = "" ]; then python_version="3.7.9"; fi -if ! [ "$nightly_build" = "" ]; then - echo "Building native installer with nightly build" +if ! [ "$build_binary_name" = "" ]; then + echo "Building native installer with nightly/beta build" is_nightly="true" else echo "Building native installer with normal build" @@ -58,8 +59,8 @@ echo "Installing PyInstaller" echo "Building Binary" cd src if [ "$is_nightly" = "true" ]; then - echo "Updating samcli.spec with nightly build" - sed -i.bak "s/'sam'/'sam-nightly'/g" installer/pyinstaller/samcli.spec + echo "Updating samcli.spec with nightly/beta build" + sed -i.bak "s/'sam'/'$build_binary_name'/g" installer/pyinstaller/samcli.spec rm installer/pyinstaller/samcli.spec.bak fi echo "samcli.spec content is:" @@ -79,8 +80,8 @@ cp installer/assets/* pyinstaller-output chmod 755 pyinstaller-output/install if [ "$is_nightly" = "true" ]; then echo "Updating install script with nightly build" - sed -i.bak "s/\/usr\/local\/aws-sam-cli/\/usr\/local\/aws-sam-cli-nightly/g" pyinstaller-output/install - sed -i.bak 's/EXE_NAME=\"sam\"/EXE_NAME=\"sam-nightly\"/g' pyinstaller-output/install + sed -i.bak "s/\/usr\/local\/aws-sam-cli/\/usr\/local\/$build_folder/g" pyinstaller-output/install + sed -i.bak 's/EXE_NAME=\"sam\"/EXE_NAME=\"$build_binary_name\"/g' pyinstaller-output/install rm pyinstaller-output/install.bak fi echo "install script content is:" From 398366add58f95b24aed9c4a647b0928495bc457 Mon Sep 17 00:00:00 2001 From: Raymond Wang <14915548+wchengru@users.noreply.github.com> Date: Mon, 26 Apr 2021 08:52:05 -0700 Subject: [PATCH 2/5] Update quotes --- installer/pyinstaller/build-linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/pyinstaller/build-linux.sh b/installer/pyinstaller/build-linux.sh index 2f0dcade7f2..599d99f97e0 100644 --- a/installer/pyinstaller/build-linux.sh +++ b/installer/pyinstaller/build-linux.sh @@ -81,7 +81,7 @@ chmod 755 pyinstaller-output/install if [ "$is_nightly" = "true" ]; then echo "Updating install script with nightly build" sed -i.bak "s/\/usr\/local\/aws-sam-cli/\/usr\/local\/$build_folder/g" pyinstaller-output/install - sed -i.bak 's/EXE_NAME=\"sam\"/EXE_NAME=\"$build_binary_name\"/g' pyinstaller-output/install + sed -i.bak 's/EXE_NAME=\"sam\"/EXE_NAME=\"'$build_binary_name'\"/g' pyinstaller-output/install rm pyinstaller-output/install.bak fi echo "install script content is:" From fa897d1c739f326f44213f6a1595b7042394d882 Mon Sep 17 00:00:00 2001 From: Raymond Wang <14915548+wchengru@users.noreply.github.com> Date: Mon, 26 Apr 2021 09:03:33 -0700 Subject: [PATCH 3/5] fix the dist folder name --- installer/pyinstaller/build-linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/pyinstaller/build-linux.sh b/installer/pyinstaller/build-linux.sh index 599d99f97e0..6837bb85a64 100644 --- a/installer/pyinstaller/build-linux.sh +++ b/installer/pyinstaller/build-linux.sh @@ -72,7 +72,7 @@ mkdir pyinstaller-output dist_folder="sam" if [ "$is_nightly" = "true" ]; then echo "using dist_folder with nightly build" - dist_folder="sam-nightly" + dist_folder=$build_binary_name fi echo "dist_folder=$dist_folder" mv "dist/$dist_folder" pyinstaller-output/dist From 48a10924572ec288bd5fdd2a4e643291d05be0e4 Mon Sep 17 00:00:00 2001 From: Raymond Wang <14915548+wchengru@users.noreply.github.com> Date: Mon, 26 Apr 2021 09:31:30 -0700 Subject: [PATCH 4/5] update logs --- installer/pyinstaller/build-linux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/pyinstaller/build-linux.sh b/installer/pyinstaller/build-linux.sh index 6837bb85a64..bdde24d2948 100644 --- a/installer/pyinstaller/build-linux.sh +++ b/installer/pyinstaller/build-linux.sh @@ -71,7 +71,7 @@ cat installer/pyinstaller/samcli.spec mkdir pyinstaller-output dist_folder="sam" if [ "$is_nightly" = "true" ]; then - echo "using dist_folder with nightly build" + echo "using dist_folder with nightly/beta build" dist_folder=$build_binary_name fi echo "dist_folder=$dist_folder" @@ -79,7 +79,7 @@ mv "dist/$dist_folder" pyinstaller-output/dist cp installer/assets/* pyinstaller-output chmod 755 pyinstaller-output/install if [ "$is_nightly" = "true" ]; then - echo "Updating install script with nightly build" + echo "Updating install script with nightly/beta build" sed -i.bak "s/\/usr\/local\/aws-sam-cli/\/usr\/local\/$build_folder/g" pyinstaller-output/install sed -i.bak 's/EXE_NAME=\"sam\"/EXE_NAME=\"'$build_binary_name'\"/g' pyinstaller-output/install rm pyinstaller-output/install.bak From 4a3262ee7140f3d79de44f54a4091ad15a8e26a5 Mon Sep 17 00:00:00 2001 From: Raymond Wang <14915548+wchengru@users.noreply.github.com> Date: Mon, 26 Apr 2021 12:01:35 -0700 Subject: [PATCH 5/5] trigger appveyor build