-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# Cleanup any leftovers | ||
rm -f ./tools/AdyenPayment.zip | ||
rm -fR /tmp/Adyen | ||
|
||
# Create deployment source | ||
echo "Copying plugin source..." | ||
mkdir -p /tmp/Adyen/deploy | ||
cp -R ./ /tmp/Adyen/deploy/AdyenPayment | ||
|
||
# Ensure proper composer dependencies | ||
echo "Installing composer dependencies..." | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/vendor | ||
composer install --no-dev --working-dir=/tmp/Adyen/deploy/AdyenPayment/ | ||
|
||
# Remove unnecessary files from final release archive | ||
echo "Removing unnecessary files from final release archive..." | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/tests | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/tools | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/PluginInstallation | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/.git | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/.idea | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/.github | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/.gitignore | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/.php-cs-fixer.cache | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/.php-cs-fixer.dist.php | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/.phpunit.result.cache | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/bitbucket-pipelines.yml | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/grumphp.yml | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/grumphp.yml.dist | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/phpcs.xml | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/phpunit.xml.dist | ||
rm -fR /tmp/Adyen/deploy/AdyenPayment/psalm.xml.dist | ||
|
||
# Create plugin archive | ||
echo "Reading plugin archive version from plugin.xml file..." | ||
version=$(grep -oPm1 "(?<=<version>)[^<]+" ./plugin.xml) | ||
echo "The plugin version from plugin.xml is: $version" | ||
|
||
echo "Creating new archive..." | ||
php tools/sw.phar plugin:zip:dir -q /tmp/Adyen/deploy/AdyenPayment/ | ||
rm -fR /tmp/Adyen | ||
|
||
mv AdyenPayment.zip ./tools/AdyenPayment.zip | ||
echo "New plugin archive for version $version created: $PWD/tools/AdyenPayment.zip" |
Binary file not shown.