Last active
August 29, 2015 14:07
-
-
Save a-r-d/f55f5869ee55166b7faa to your computer and use it in GitHub Desktop.
Bash script for deploying roots themes. Packages theme file into a zip, omits .git and node_modules.
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/bash | |
# | |
# This is a simple deploy script to create a .zip file of your theme | |
# The first argument passed becomes the .zip filename. | |
echo "Building site for packaging..." | |
grunt build | |
echo "Begin zipping..." | |
FILE="roots-deploy-theme.zip" | |
if [ ! -z "$1" ] | |
then | |
FILE=$1 | |
else | |
echo "No argument given, using default name: $FILE" | |
fi | |
if [ -r "$FILE" ] | |
then | |
echo "Cleaning up last deploy file..." | |
rm "$FILE" | |
fi | |
echo "Zipping theme contents into file: $FILE" | |
zip -r "$FILE" . -x node_modules\* *.zip deploy-roots.sh .git\* | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment