Created
July 17, 2019 13:47
-
-
Save crittermike/f185df073be6a66be258138b22e00947 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 | |
yellow='\033[1;33m' | |
NC='\033[0m' | |
cd "$PROJECT_ROOT" | |
echo | |
echo -e "${yellow}Cloning Pantheon repo...${NC}" | |
git clone ssh://codeserver.dev.f5ee6474-0663-441f-8ef0-9f5f54e427d4@codeserver.dev.f5ee6474-0663-441f-8ef0-9f5f54e427d4.drush.in:2222/~/repository.git pantheon-codebase | |
echo | |
echo -e "${yellow}Copying web directory to Pantheon repo...${NC}" | |
rm -rf pantheon-codebase/* | |
cp -r web/* pantheon-codebase | |
git clone [email protected]:pantheon-systems/drops-7.git | |
cp -r drops-7/includes pantheon-codebase/ | |
cp -r drops-7/modules pantheon-codebase/ | |
cp -r drops-7/profiles pantheon-codebase/ | |
cp -r drops-7/themes pantheon-codebase/ | |
cp -r drops-7/pantheon.upstream.yml pantheon-codebase/pantheon.upstream.yml | |
cp drops-7/LICENSE.txt pantheon-codebase/LICENSE.txt | |
cp -r drops-7/modules/pantheon pantheon-codebase/modules | |
cp -r drops-7/misc/healthchecks pantheon-codebase/misc | |
cp -r drops-7/profiles/pantheon pantheon-codebase/profiles | |
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