summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorRomain Bazile <romain@bazile.io>2022-03-01 17:23:42 +0100
committerGitHub <noreply@github.com>2022-03-01 16:23:42 +0000
commit5d044ba71b7eba33860fdbf222a9a29ae42691e9 (patch)
tree385c3b53c10eb31f4506ace5771fcc9b5c915651 /build.sh
parenta120c4128ece237754af9e8bef6679d6a51f73ec (diff)
Addition of a `DEPLOY_COMPRESSION` option to the configuration (#592)
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index f743e2a..4b75e79 100755
--- a/build.sh
+++ b/build.sh
@@ -203,12 +203,22 @@ fi
export USE_QEMU="${USE_QEMU:-0}"
export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}"
-export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
+export ARCHIVE_FILENAME="${ARCHIVE_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
export SCRIPT_DIR="${BASE_DIR}/scripts"
export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_NAME}"}"
export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
-export DEPLOY_ZIP="${DEPLOY_ZIP:-1}"
+
+# DEPLOY_ZIP was deprecated in favor of DEPLOY_COMPRESSION
+# This preserve the old behavior with DEPLOY_ZIP=0 where no archive was created
+if [ -z "${DEPLOY_COMPRESSION}" ] && [ "${DEPLOY_ZIP:-1}" = "0" ]; then
+ echo "DEPLOY_ZIP has been deprecated in favor of DEPLOY_COMPRESSION"
+ echo "Similar behavior to DEPLOY_ZIP=0 can be obtained with DEPLOY_COMPRESSION=none"
+ echo "Please update your config file"
+ DEPLOY_COMPRESSION=none
+fi
+export DEPLOY_COMPRESSION=${DEPLOY_COMPRESSION:-zip}
+export COMPRESSION_LEVEL=${COMPRESSION_LEVEL:-6}
export LOG_FILE="${WORK_DIR}/build.log"
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}