mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-02-23 15:38:23 +01:00
Enhance package.sh to support platform-specific archive creation using PowerShell on Windows
This commit is contained in:
@@ -107,7 +107,13 @@ cp -f "${JAR_LOCATION}" "${PACKAGING_DIR}/common/ATCS.jar" # Copy JAR to version
|
|||||||
# --- Create archive ---
|
# --- Create archive ---
|
||||||
cd "${PACKAGING_DIR}" || exit
|
cd "${PACKAGING_DIR}" || exit
|
||||||
echo "Creating archive"
|
echo "Creating archive"
|
||||||
zip -r "ATCS_${VERSION}.zip" common/* # archive the 'common' folder which now contains the JAR and libs
|
if [ "$PLATFORM" = "WINDOWS" ]; then
|
||||||
|
# Use PowerShell's Compress-Archive which is available by default on Windows
|
||||||
|
powershell.exe -Command "Compress-Archive -Path './common/*' -DestinationPath './ATCS_${VERSION}.zip' -Force"
|
||||||
|
else
|
||||||
|
# Use zip command on Linux
|
||||||
|
zip -r "ATCS_${VERSION}.zip" common/* # archive the 'common' folder which now contains the JAR and libs
|
||||||
|
fi
|
||||||
echo "Created archive at ${PACKAGING_DIR}/ATCS_${VERSION}.zip"
|
echo "Created archive at ${PACKAGING_DIR}/ATCS_${VERSION}.zip"
|
||||||
cd "${PACKAGING_DIR}" || exit
|
cd "${PACKAGING_DIR}" || exit
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user