Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (20 sloc) 678 Bytes
#!/usr/bin/env bash
if [ -n "$(git status --porcelain)" ]; then
echo 'Files not commited to git. Do that before deploy.';
exit 1;
if [ -n "$(git diff origin/master..HEAD)" ]; then
echo 'Files not pushed upstream via git or not on MASTER. Do that before deploy.'
exit 1;
read -p "Are you sure you want to deploy? This will replace *everything* on the server. (y/n) " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
echo 'Building Files...';
grunt build;
echo 'Build Done.';
echo 'Syncing Files to remote server...';
rsync -a build/ --delete;
echo 'Deploy Done.';