You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/usr/bin/env bash
|
|
|
|
########################################################################
|
|
|
|
# Copyright 2014 Lukas Bestle <project-projectr@lukasbestle.com>
|
|
|
|
# License MIT
|
|
|
|
########################################################################
|
|
|
|
# Reverses a deployable site to the last version.
|
|
|
|
#
|
|
|
|
# Usage: site_rollback <site>
|
|
|
|
#
|
|
|
|
# <site> Name of the site (directory in ~/web/sites/)
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
site="$1"
|
|
|
|
|
|
|
|
if [[ -z "$site" ]]; then
|
|
|
|
# Print help
|
|
|
|
echo -e "\033[1mUsage:\033[0m \033[34msite_rollback\033[0m <site>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Delegate to project_rollback
|
|
|
|
project_rollback "$HOME/web/sites/$site"
|
|
|
|
exit $?
|