Skip to content

Commit

Permalink
Merge pull request #10 from tagconcierge/bugfix/gtm-loading
Browse files Browse the repository at this point in the history
build script improvement
  • Loading branch information
mfrankiewicz authored Jul 2, 2024
2 parents fa91b04 + 21d3402 commit 4fa3e6a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "tagconcierge/gtm-consent-mode-banner-wordpress",
"type": "wordpress-plugin",
"version": "1.0.2",
"minimum-stability": "stable",
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions dev/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
#!/usr/bin/env bash

RELEASE_VERSION=$(cat gtm-consent-mode-banner.php | grep 'Version:' | awk -F' ' '{print $3}')

docker-compose run --rm -T php-cli <<INPUT
composer install --no-dev
composer install
composer run check
rm -rf vendor
composer install --no-dev --optimize-autoloader
rm -rf dist/
rm -rf dist/*
mkdir -p dist/gtm-consent-mode-banner
cp gtm-consent-mode-banner.php dist/gtm-consent-mode-banner/
cp readme.txt dist/gtm-consent-mode-banner/
cp -R src dist/gtm-consent-mode-banner/src
cp -R vendor dist/gtm-consent-mode-banner/vendor
cp -R composer.* dist/gtm-consent-mode-banner/
cd dist && zip -r gtm-consent-mode-banner.zip gtm-consent-mode-banner
cd dist && zip -r gtm-consent-mode-banner-$RELEASE_VERSION.zip gtm-consent-mode-banner
INPUT

0 comments on commit 4fa3e6a

Please sign in to comment.