2011-01-23 12:45:18 +01:00
|
|
|
#!/bin/sh
|
|
|
|
DIRECTORY=$(cd `dirname $0` && pwd)
|
|
|
|
|
|
|
|
## VARIABLES ###
|
|
|
|
LOG_DIR="$DIRECTORY"/logs
|
|
|
|
DATE=$(date +%d-%m-%y)
|
|
|
|
LOG_FILE="$LOG_DIR/${DATE}.log"
|
|
|
|
|
|
|
|
|
|
|
|
mkdir $LOG_DIR
|
|
|
|
# check build already run today
|
|
|
|
if [ -e "$LOG_FILE" ]; then
|
|
|
|
echo "Build already ran today"
|
2011-01-23 12:49:57 +01:00
|
|
|
exit
|
2011-01-23 12:45:18 +01:00
|
|
|
fi
|
|
|
|
touch $LOG_FILE
|
|
|
|
|
|
|
|
|
|
|
|
# 1. Update git directory
|
2011-01-23 13:26:09 +01:00
|
|
|
"${DIRECTORY}/update_git.sh" 2>&1 >>$LOG_FILE
|
2011-01-23 12:45:18 +01:00
|
|
|
|
|
|
|
# 2. Go through branches and generates builds
|
2011-01-23 13:28:17 +01:00
|
|
|
"${DIRECTORY}/build_branches.sh" 2>&1 >>$LOG_FILE
|
2011-01-23 12:45:18 +01:00
|
|
|
|
2011-01-23 13:28:17 +01:00
|
|
|
# 3. upload to ftp server
|
|
|
|
# TODO test and uncomment
|
2011-01-23 13:26:09 +01:00
|
|
|
#"${DIRECTORY}/upload_ftp.sh" 2>&1 >>$LOG_FILE
|
2011-01-23 12:45:18 +01:00
|
|
|
|
|
|
|
# 4. Synchronize github with googlecode mercurial
|
2011-01-23 13:26:09 +01:00
|
|
|
"${DIRECTORY}/sync_git_hg.sh" 2>&1 >>$LOG_FILE
|
2011-01-23 12:45:18 +01:00
|
|
|
|
|
|
|
|