From fa12832b455cd845f1fc21267d15a6eb619c65dd Mon Sep 17 00:00:00 2001 From: Bryan Enders <2033828+bryanenders@users.noreply.github.com> Date: Thu, 2 Feb 2023 12:04:41 -0500 Subject: [PATCH 1/4] Remove redundant line from script --- scripts/hab-wrap-and-push.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/hab-wrap-and-push.sh b/scripts/hab-wrap-and-push.sh index bfbb51d32..7b71e9cdf 100644 --- a/scripts/hab-wrap-and-push.sh +++ b/scripts/hab-wrap-and-push.sh @@ -20,7 +20,6 @@ mkdir -p ./hab/cache/keys/ echo $BLDR_RET_PUB_B64 | base64 -d > /hab/cache/keys/mozillareality-20190117233449.pub echo $BLDR_RET_PUB_B64 | base64 -d > ./hab/cache/keys/mozillareality-20190117233449.pub echo $BLDR_HAB_PVT_B64 | base64 -d > /hab/cache/keys/mozillareality-20190117233449.sig.key -echo $BLDR_HAB_PVT_B64 | base64 -d > /hab/cache/keys/mozillareality-20190117233449.sig.key echo "### build hab pkg" export HAB_AUTH_TOKEN=$BLDR_HAB_TOKEN From 41db677858f6b82f9acb8a94267e9a271b19b627 Mon Sep 17 00:00:00 2001 From: Bryan Enders <2033828+bryanenders@users.noreply.github.com> Date: Thu, 2 Feb 2023 12:05:07 -0500 Subject: [PATCH 2/4] Remove trailing whitespace --- scripts/hab-wrap-and-push.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/hab-wrap-and-push.sh b/scripts/hab-wrap-and-push.sh index 7b71e9cdf..daac38fde 100644 --- a/scripts/hab-wrap-and-push.sh +++ b/scripts/hab-wrap-and-push.sh @@ -10,7 +10,7 @@ apk add curl org="biome-sh";repo="biome" ver=$(curl -s https://api.github.com/repos/$org/$repo/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') dl="https://github.com/$org/$repo/releases/download/$ver/bio-${ver#"v"}-x86_64-linux.tar.gz" -echo "[info] getting bio from: $dl" && curl -L -o bio.gz $dl && tar -xf bio.gz +echo "[info] getting bio from: $dl" && curl -L -o bio.gz $dl && tar -xf bio.gz cp ./bio /usr/bin/bio && bio --version export HAB_ORIGIN=mozillareality @@ -57,7 +57,7 @@ do_verify() { do_prepare() { export LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 export MIX_ENV=prod - export RELEASE_VERSION="1.0.$(echo $pkg_prefix | cut -d '/' -f 7)" + export RELEASE_VERSION="1.0.$(echo $pkg_prefix | cut -d '/' -f 7)" # Rebar3 will hate us otherwise because it looks for # /usr/bin/env when it does some of its compiling From f6c30fee31b9ab6097ebfebb437c3fe3532e2670 Mon Sep 17 00:00:00 2001 From: Bryan Enders <2033828+bryanenders@users.noreply.github.com> Date: Thu, 2 Feb 2023 12:06:03 -0500 Subject: [PATCH 3/4] Only compile habitat build once --- scripts/hab-wrap-and-push.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/hab-wrap-and-push.sh b/scripts/hab-wrap-and-push.sh index daac38fde..60bdab836 100644 --- a/scripts/hab-wrap-and-push.sh +++ b/scripts/hab-wrap-and-push.sh @@ -69,13 +69,9 @@ do_build() { mix local.hex --force mix local.rebar --force mix deps.get --only prod - mix deps.clean mime --build - rm -rf _build - mix compile + MIX_ENV=prod mix distillery.release } do_install() { - rm -rf _build/prod/rel/ret/releases - MIX_ENV=prod mix distillery.release # TODO 1.9 releases chmod 0655 _build/prod/rel/ret/bin/* cp -a _build/prod/rel/ret/* ${pkg_prefix} From 30f11474e2b89539f8392f9f5a49bb4a838687d6 Mon Sep 17 00:00:00 2001 From: Bryan Enders <2033828+bryanenders@users.noreply.github.com> Date: Thu, 2 Feb 2023 12:13:44 -0500 Subject: [PATCH 4/4] Remove leading whitespace --- scripts/hab-wrap-and-push.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/hab-wrap-and-push.sh b/scripts/hab-wrap-and-push.sh index 60bdab836..7c8e1b3f6 100644 --- a/scripts/hab-wrap-and-push.sh +++ b/scripts/hab-wrap-and-push.sh @@ -1,4 +1,3 @@ - set -e #BLDR_HAB_TOKEN='_Qk9YLTEKYmxkci0yMDE3M...'