Closed
Bug 903068
Opened 13 years ago
Closed 13 years ago
write update script for clobberer
Categories
(Infrastructure & Operations :: IT-Managed Tools, task)
Infrastructure & Operations
IT-Managed Tools
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dustin, Assigned: dustin)
Details
This is currently an 'hg pull -u' followed by a deploy, so that should be scripted.
| Assignee | ||
Comment 1•13 years ago
|
||
#! /bin/bash
REV="${1}"
if [ -z "${REV}" ]; then
echo "USAGE: ./update REV ENVIRONMENT -- (hint: use 'tip' for the latest revision)"
exit 1
fi
ENV="${2}"
case "${ENV}" in
prod) TOOLS_DIR=tools ;;
stage) TOOLS_DIR=tools-stage ;;
*) echo "environment must be 'stage' or 'prod'"; exit 1;;
esac
SITE_DIR=`cd $(dirname $0); pwd`
SITE=clobberer
CLUSTER=`echo $SITE_DIR | sed -e 's!^/data/\([^/]*\)/.*!\1!'`
set -e
cd $SITE_DIR/$TOOLS_DIR
hg pull
hg up -r "${REV}"
# store the hg revision for sync-extras.sh
hg ident > $SITE_DIR/tools.revision
echo -e "Deploying code..."
if [ $TERM == 'dumb' ]; then
# if run from cron, don't try to push
/data/$CLUSTER/deploy -n $SITE
else
/data/$CLUSTER/deploy $SITE
fi
plus corresponding docs.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•