Skip to content

Commit

Permalink
Allow custom deploy zip filename
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa authored and fuji246 committed Sep 13, 2019
1 parent e4b7496 commit fc33611
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions export-image/04-finalise/01-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fc33611

Please sign in to comment.