Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit fefe9c8

Browse files
committed
Update build scripts to include vendor directory
1 parent e4a4ee6 commit fefe9c8

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

bin/build-plugin-zip.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ fi
7777

7878
# Run the build.
7979
status "Installing dependencies... 📦"
80+
composer install --no-dev
8081
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install
8182
status "==========================="
8283
npm list webpack

bin/github-deploy.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ echo "Before proceeding:"
5353
echo " • Ensure you have checked out the branch you wish to release"
5454
echo " • Ensure you have committed/pushed all local changes"
5555
echo " • Did you remember to update versions, changelogs, and stable tags in the readme and plugin files?"
56-
echo " • If you are running this script directory instead of via '$ npm run deploy', ensure you have built assets."
56+
echo " • If you are running this script directory instead of via '$ npm run deploy', ensure you have built assets and installed composer in --no-dev mode."
5757
echo
5858
output 3 "Do you want to continue? [y/N]: "
5959
read -r PROCEED
@@ -102,6 +102,11 @@ git add build/. --force
102102
git add .
103103
git commit -m "Adding /build directory to release"
104104

105+
# Force add vendor directory and commit.
106+
git add vendor/. --force
107+
git add .
108+
git commit -m "Adding /vendor directory to release"
109+
105110
# Push branch upstream
106111
git push origin $BRANCH
107112

bin/wordpress-deploy.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ if [ ! -d "$GIT_PATH/build" ]; then
137137
exit 1
138138
fi
139139

140+
if [ ! -d "$GIT_PATH/vendor" ]; then
141+
output 3 "Vendor directory not found in tag. Aborting."
142+
exit 1
143+
fi
144+
140145
# Checkout SVN repository if not exists
141146
if [ ! -d "$SVN_PATH" ]; then
142147
output 2 "No SVN directory found, fetching files..."

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"license": "GPL-3.0+",
1818
"scripts": {
19-
"deploy": "npm run build --loglevel error && sh ./bin/github-deploy.sh",
19+
"deploy": "composer install --no-dev && npm run build --loglevel error && sh ./bin/github-deploy.sh",
2020
"release": "sh ./bin/wordpress-deploy.sh",
2121
"prepack": "npm install && npm run lint && npm run test && npm run build",
2222
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",

0 commit comments

Comments
 (0)