Last active
December 19, 2015 15:59
-
-
Save jasonsnider/5980052 to your computer and use it in GitHub Desktop.
This is the shell script I use for updating jasonsnider.com. I am building jasonsnider,com as three separate .git projects. Tinker (an MVC framework), Jsc (the jasonsnider.com plugin), JscTheme (the theme for jasonsnider.com). Rather than using submodules I'm treating each piece as it's own project. When new code gets pushed to the repository I …
This file contains hidden or 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/sh | |
# Completely removes, rebuilds and reconfigures jasonsnider.com from it's git repositories | |
# Jason D Snider <[email protected]> | |
## Start by removing the entire website | |
rm -fR /var/www/jasonsnider.com/tinker | |
## Build the code base | |
cd /var/www/jasonsnider.com && git clone [email protected]:jasonsnider/tinker.git | |
cd /var/www/jasonsnider.com/tinker && git clone [email protected]:jasonsnider/jsc.git Jsc | |
cd /var/www/jasonsnider.com/tinker/themes && git clone [email protected]:jasonsnider/jsc-theme.git Jsc | |
## Build the documentation | |
cd /var/www/jasonsnider.com/tinker/webroot && git clone [email protected]:jasonsnider/jsc-docs.git | |
cd /var/www/jasonsnider.com/tinker/webroot && git clone [email protected]:jasonsnider/tinker-docs.git | |
## Update the code base | |
cd /var/www/jasonsnider.com/tinker/ && git pull origin master | |
cd /var/www/jasonsnider.com/tinker/Jsc && git pull origin master | |
cd /var/www/jasonsnider.com/tinker/themes/Jsc && git pull origin master | |
## Update documentation | |
cd /var/www/jasonsnider.com/tinker/webroot/jsc-docs && git pull origin master | |
cd /var/www/jasonsnider.com/tinker/webroot/tinker-docs && git pull origin master | |
# The Jsc Theme holds all of the webroot assets for jaosnsnider.com, here we will migrate those files from the theme | |
# and into our production environment | |
## Replace the exisiting Jsc themes | |
rm -fR /var/www/jasonsnider.com/tinker/webroot/themes/jsc | |
cp -R /var/www/jasonsnider.com/tinker/themes/Jsc/webroot /var/www/jasonsnider.com/tinker/webroot/themes/jsc | |
## Replace the robots.txt file | |
rm -f /var/www/jasonsnider.com/tinker/webroot/robots.txt | |
cp /var/www/jasonsnider.com/tinker/themes/Jsc/webroot/robots.txt /var/www/jasonsnider.com/tinker/webroot/robots.txt | |
# The Jsc Plugin holds all of the configuration files jaosnsnider.com, here we will migrate those files from the plugin | |
# and into our production environment | |
## Replace the main config file | |
rm -f /var/www/jasonsnider.com/tinker/config/Config.php | |
cp /var/www/jasonsnider.com/tinker/Jsc/config/Config.php /var/www/jasonsnider.com/tinker/config/Config.php | |
## Replace the main routing file | |
rm -f /var/www/jasonsnider.com/tinker/config/Routes.php | |
cp /var/www/jasonsnider.com/tinker/Jsc/config/Routes.php /var/www/jasonsnider.com/tinker/config/Routes.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment