diff --git a/scripts/hab-wrap-and-push.sh b/scripts/hab-wrap-and-push.sh index bfbb51d32..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...' @@ -10,7 +9,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 @@ -20,7 +19,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 @@ -58,7 +56,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 @@ -70,13 +68,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}