Update build scripts to include vendor directory

This commit is contained in:
Mike Jolley 2019-07-11 12:05:20 +01:00
parent ac74504400
commit bbadbf674a
4 changed files with 13 additions and 2 deletions

View File

@ -77,6 +77,7 @@ fi
# Run the build.
status "Installing dependencies... 📦"
composer install --no-dev
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install
status "==========================="
npm list webpack

View File

@ -53,7 +53,7 @@ echo "Before proceeding:"
echo " • Ensure you have checked out the branch you wish to release"
echo " • Ensure you have committed/pushed all local changes"
echo " • Did you remember to update versions, changelogs, and stable tags in the readme and plugin files?"
echo " • If you are running this script directory instead of via '$ npm run deploy', ensure you have built assets."
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."
echo
output 3 "Do you want to continue? [y/N]: "
read -r PROCEED
@ -102,6 +102,11 @@ git add build/. --force
git add .
git commit -m "Adding /build directory to release"
# Force add vendor directory and commit.
git add vendor/. --force
git add .
git commit -m "Adding /vendor directory to release"
# Push branch upstream
git push origin $BRANCH

View File

@ -137,6 +137,11 @@ if [ ! -d "$GIT_PATH/build" ]; then
exit 1
fi
if [ ! -d "$GIT_PATH/vendor" ]; then
output 3 "Vendor directory not found in tag. Aborting."
exit 1
fi
# Checkout SVN repository if not exists
if [ ! -d "$SVN_PATH" ]; then
output 2 "No SVN directory found, fetching files..."

View File

@ -16,7 +16,7 @@
},
"license": "GPL-3.0+",
"scripts": {
"deploy": "npm run build --loglevel error && sh ./bin/github-deploy.sh",
"deploy": "composer install --no-dev && npm run build --loglevel error && sh ./bin/github-deploy.sh",
"release": "sh ./bin/wordpress-deploy.sh",
"prepack": "npm install && npm run lint && npm run test && npm run build",
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",