Created
August 6, 2018 20:35
-
-
Save crittermike/0d046b54a240b19fed910bd3e9e1cec9 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
## Push the local site to the Pantheon repo | |
yellow='\033[1;33m' | |
NC='\033[0m' | |
cd "$PROJECT_ROOT" | |
echo | |
echo -e "${yellow}Cloning Pantheon repo...${NC}" | |
git clone PANTHEON_REPO_URL pantheon-codebase | |
echo | |
echo -e "${yellow}Copying web directory to Pantheon repo...${NC}" | |
rm -rf pantheon-codebase/* | |
cp -r web/* pantheon-codebase | |
cd pantheon-codebase | |
git checkout -- sites/default/settings.php | |
git add * | |
git status | |
read -p "Does this look correct? (y/n)" -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo | |
echo -e "${yellow}Pushing to Pantheon...${NC}" | |
git commit -m "Updates from GitHub repo" | |
git push | |
fi | |
echo | |
echo -e "${yellow}Cleaning up...${NC}" | |
cd "$PROJECT_ROOT" | |
rm -rf pantheon-codebase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment