From 77edcebc99076881dbe8e8f3dbca93bb8fb4511e Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 12 May 2022 20:12:44 -0400 Subject: [PATCH] Windows build: Factor out output zip filename --- src/bin/buildForWindows.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bin/buildForWindows.sh b/src/bin/buildForWindows.sh index ee225f36e..480474de5 100755 --- a/src/bin/buildForWindows.sh +++ b/src/bin/buildForWindows.sh @@ -15,10 +15,12 @@ done # Move to the folder where Etherpad is checked out try cd "${0%/*}" -START_FOLDER=$(try git rev-parse --show-toplevel) || exit 1 -try cd "${START_FOLDER}" +workdir=$(try git rev-parse --show-toplevel) || exit 1 +try cd "${workdir}" [ -f src/package.json ] || fatal "failed to cd to etherpad root directory" +OUTPUT=${workdir}/etherpad-lite-win.zip + TMP_FOLDER=$(try mktemp -d) || exit 1 log "create a clean environment in $TMP_FOLDER..." @@ -54,9 +56,9 @@ try rm -rf "$TMP_FOLDER"/src/node_modules/nodemailer/node_modules/mailcomposer/n log "create the zip..." try cd "$TMP_FOLDER" -try zip -9 -r "$START_FOLDER"/etherpad-lite-win.zip ./* -x var +try zip -9 -r "${OUTPUT}" ./* -x var log "clean up..." try rm -rf "$TMP_FOLDER" -log "Finished. You can find the zip in the Etherpad root folder, it's called etherpad-lite-win.zip" +log "Finished. You can find the zip at ${OUTPUT}"