You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
654 B
25 lines
654 B
#!/bin/bash |
|
NAME="woocommerce-product-bundle" |
|
VERSION="3.9.0.20200307" |
|
ZIPBASEDIR="$(dirname $(realpath $0))" |
|
ZIPNAME="${NAME}-${VERSION}.zip" |
|
ZIPFILE="$(realpath ${ZIPBASEDIR}/../${ZIPNAME})" |
|
ZIPTMPDIR="$(mktemp -d)" |
|
ZIPDIRNAME="woo-product-bundle" |
|
ZIPDIR="${ZIPTMPDIR}/${ZIPDIRNAME}" |
|
|
|
echo "Creating ${NAME}-${VERSION}.zip from \"${ZIPBASEDIR}\"" |
|
|
|
echo "Compress to zip" |
|
pushd "${ZIPTMPDIR}" >/dev/null |
|
if [[ -f ${ZIPFILE} ]] ; then |
|
rm ${ZIPFILE} |
|
fi |
|
cp -a "${ZIPBASEDIR}" "${ZIPDIR}" |
|
zip -q -r "${ZIPFILE}" ./"${ZIPDIRNAME}"/* -x \*build.sh -x \*.git -x \*.sonarlint |
|
popd >/dev/null |
|
|
|
rm -rf "${ZIPTMPDIR}" |
|
|
|
echo "Complete" |
|
echo "Zipfile: ${ZIPFILE}"
|
|
|