Skip to content

Commit

Permalink
build: add version to filename
Browse files Browse the repository at this point in the history
  • Loading branch information
rommelfreddy committed Jun 10, 2022
1 parent 56fa8cd commit d764398
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BASEDIR=$(cd `dirname $0` && pwd)
PLUGIN_DIR=$(dirname "$BASEDIR")
PLUGIN_NAME="BilliePaymentSW6"
BUILD_DIR=$(dirname "PLUGIN_DIR")/build/
MODULE_VERSION=$(grep -Po '(?<="version": ")(.*)(?=",)' "$PLUGIN_DIR"/composer.json)

rm -rf "$BUILD_DIR"
mkdir -p build/dist/"$PLUGIN_NAME"
Expand All @@ -24,9 +25,8 @@ rm -rf "$BUILD_DIR"/dist/"$PLUGIN_NAME"/vendor/billie/api-php-sdk/tests
rm -rf "$BUILD_DIR"/dist/"$PLUGIN_NAME"/vendor/billie/api-php-sdk/.git
rm -rf "$BUILD_DIR"/dist.tar.gz


(cd "$BUILD_DIR"/dist && zip -r "$PLUGIN_NAME"-github.zip "$PLUGIN_NAME")
(cd "$BUILD_DIR"/dist && zip -r "$PLUGIN_NAME"-"$MODULE_VERSION"-github.zip "$PLUGIN_NAME")

# somebody has setup the module in the shopware store as proprietary. So we need to change the license to pass the checks
sed -i 's#"MIT"#"proprietary"#g' "$BUILD_DIR"/dist/"$PLUGIN_NAME"/composer.json
(cd "$BUILD_DIR"/dist && zip -r "$PLUGIN_NAME"-shopware.zip "$PLUGIN_NAME")
(cd "$BUILD_DIR"/dist && zip -r "$PLUGIN_NAME"-"$MODULE_VERSION"-shopware.zip "$PLUGIN_NAME")

0 comments on commit d764398

Please sign in to comment.