From 2d70ac83f85d37bbff9a8cb3c582df8129b30346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sowa?= Date: Wed, 19 Dec 2018 13:06:57 +0100 Subject: [PATCH] Allow custom deploy zip filename --- build.sh | 1 + export-image/04-finalise/01-run.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 213be84..c44e6db 100755 --- a/build.sh +++ b/build.sh @@ -145,6 +145,7 @@ 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}${IMG_SUFFIX}"}" +export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}"}" BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" export SCRIPT_DIR="${BASE_DIR}/scripts" diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index eee9c5c..f5a5fd8 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -74,10 +74,10 @@ unmount_image "${IMG_FILE}" mkdir -p "${DEPLOY_DIR}" -rm -f "${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip" +rm -f "${DEPLOY_DIR}/${ZIP_FILENAME}.zip" pushd "${STAGE_WORK_DIR}" > /dev/null -zip "${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip" \ +zip "${DEPLOY_DIR}/${ZIP_FILENAME}.zip" \ "$(basename "${IMG_FILE}")" popd > /dev/null