From 3518030c603c30d2385f4f1607023c0ffad66bef Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 2 May 2021 19:16:54 +0100 Subject: [PATCH] ci: add dev deploy command --- _tools/build.sh | 6 ++++-- _tools/deploy-dev.sh | 11 +++++++++++ composer.json | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 _tools/deploy-dev.sh diff --git a/_tools/build.sh b/_tools/build.sh index 09ade5d..6ef7346 100755 --- a/_tools/build.sh +++ b/_tools/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +# TODO: Add transpilation to PHP 7.4 + echo "Building Plugin..." # Moves everything including the style sheets over to `dist/` @@ -33,8 +35,8 @@ rm -r dist/*/{js,css}/*[^\.min].{js,css} echo "Minification complete." if [[ $1 == "-v" ]]; then - rm -rf ../VVV/www/wordpress-one/public_html/wp-content/plugins/footnotes - mv dist footnotes && mv footnotes ../VVV/www/wordpress-one/public_html/wp-content/plugins + rm -rf ../VVV/www/wordpress-two/public_html/wp-content/plugins/footnotes + mv dist footnotes && mv footnotes ../VVV/www/wordpress-two/public_html/wp-content/plugins fi echo "Build complete." diff --git a/_tools/deploy-dev.sh b/_tools/deploy-dev.sh new file mode 100755 index 0000000..07c83e7 --- /dev/null +++ b/_tools/deploy-dev.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [[ $1 == "-v" ]]; then + echo "Deploying to VVV site #1" + rm -rf ../VVV/www/wordpress-one/public_html/wp-content/plugins/footnotes + cp -r src footnotes && mv footnotes ../VVV/www/wordpress-one/public_html/wp-content/plugins + #rm -rf ./footnotes +fi + +echo "Deploy complete." +exit 0 diff --git a/composer.json b/composer.json index 08b43dd..9632f7b 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,8 @@ "cm": "npm run cz", "release": "./_tools/release.sh", "release:commit": "composer run release -- -c", + "deploy": "composer run build -- -v", + "deploy:dev": "./_tools/deploy-dev.sh -v", "build": "./_tools/build.sh", "lint": "composer run lint:php; npm run lint", "lint:fix": "composer run lint:php:fix; npm run lint:fix",