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

Commit

Permalink
Update build scripts to include vendor directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jul 11, 2019
1 parent e4a4ee6 commit fefe9c8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion bin/github-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions bin/wordpress-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit fefe9c8

Please sign in to comment.