blob: 5566ac0a8ce8c79c68a3454c29e8f9efd552e914 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/sh
TC=tomcat6
if [ -z $TC_HOME ]; then
TC_HOME=/var/lib/$TC
fi
if [ -z $TC_CMD ]; then
TC_CMD="sudo /sbin/service $TC"
fi
rpm -q $TC > /dev/null
if [ "$?" -ne 0 ]; then
TC=tomcat5
rpm -q $TC > /dev/null
if [ "$?" -ne 0 ]; then
echo "DEPLOYMENT FAILED: you don't have tomcat installed"
exit 1
fi
fi
buildr candlepin:schema_gen
sudo service tomcat6 stop
dropdb candlepin && createdb candlepin
psql candlepin < target/schemagen/candlepin-proxy.sql
psql candlepin < code/schema/postgresql/populate-defaults.sql
buildr package test=no
sudo rm -rf $TC_HOME/webapps/candlepin/
sudo cp target/candlepin-1.0.0.war $TC_HOME/webapps/
$TC_CMD stop
$TC_CMD start
|