forked from nytimes/library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bash script for installing customizations in heroku deploy
- Loading branch information
Showing
4 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: npm run build && npm start | ||
web: ./bin/install_customizations && npm run build && npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Checking for CUSTOMIZATION_GIT_REPO environment variable..." | ||
|
||
if ! [[ -z ${CUSTOMIZATION_GIT_REPO} ]]; | ||
then | ||
echo "Cloning custom repo..."; | ||
rm -rf ./custom; | ||
git clone $CUSTOMIZATION_GIT_REPO custom; | ||
echo "Installing custom packages..."; | ||
cd ./custom; | ||
npm i; | ||
yes | cp -rf ./node_modules/* ../node_modules; | ||
cd ..; | ||
echo "Rebuilding assets..." | ||
npm run build; | ||
else | ||
echo "Not found. Continuing with standard Library deploy"; | ||
fi; | ||
|
||
echo "Done!" |