Allow custom deploy zip filename
This commit is contained in:
parent
4a0f5e87b7
commit
2d70ac83f8
1
build.sh
1
build.sh
|
@ -145,6 +145,7 @@ fi
|
||||||
export USE_QEMU="${USE_QEMU:-0}"
|
export USE_QEMU="${USE_QEMU:-0}"
|
||||||
export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
|
export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
|
||||||
export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}"}"
|
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)"
|
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
export SCRIPT_DIR="${BASE_DIR}/scripts"
|
export SCRIPT_DIR="${BASE_DIR}/scripts"
|
||||||
|
|
|
@ -74,10 +74,10 @@ unmount_image "${IMG_FILE}"
|
||||||
|
|
||||||
mkdir -p "${DEPLOY_DIR}"
|
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
|
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}")"
|
"$(basename "${IMG_FILE}")"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user