root/other-projects/nightly-tasks/crons-and-scripts/macos_nightly_cron.sh.TEMPLATE @ 32392

Revision 32392, 2.9 KB (checked in by ak19, 14 months ago)

Template script for Macs (and linux?) for running the nightly and release binary process

  • Property svn:executable set to *
Line 
1echo "@@@ Ejecting disk 1 so that wrapping step (.dmg creation) won't suddenly fail"
2
3# ensure disk1 is unmounted
4hdutil eject /dev/disk1
5
6# Set up the correct versions of svn and Java if the correct versions aren't already on the PATH
7# However, this is only for any svn and java commands in this file
8# The release kit uses envi to set up its environment at
9# envi/etc/environment.pl and envi/etc/tasks/snapshot/environment.pl
10export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
11echo "@@@ JAVA_HOME set to $JAVA_HOME"
12#export PATH=/opt/subversion/bin/:$JAVA_HOME/bin:$PATH
13#export HINT=/System/Library/Frameworks/JavaVM.framework/Versions/Current
14
15env >> /Volumes/Research/nzdl/logs/caveats.log 2>&1;
16
17# update the release-kits
18echo "@@@ Updating the release-kits"
19svn up /Volumes/Research/nzdl/release-kits
20
21
22# Finally, generate the caveats
23echo "Generating the caveats"
24
25cd /Volumes/Research/nzdl/envi/bin
26
27# if a param is passed in and it's 2, generate GS2 caveat
28# if a param is passed in and it's 3, generate GS3 caveat
29# if the first param is 'release' and the 2nd is the release number (e.g. 3.09rc2),
30# generate a GS2 or GS3 release binary as indicated by the 2nd parameter
31# if no param is passed in, or if it's other than 2 or 3 or release or help,
32# generate everything (GS2 and GS3 caveats and stables)
33if test ! -z "$1" ; then
34    if test "$1" == "-h" || test "$1" == "--help" || test "$1" == "-?" ; then
35        echo "*************************************************"
36        echo "Usage: $0 <1|2|release <gs-release-version>[rc#]>"
37        echo "     - $0 by itself will generate caveats for 2 followed by 3"
38        echo "     - $0 2 will generate the caveat for 2"
39        echo "     - $0 3 will generate the caveat for 3"
40        echo "     - $0 release will print out the usage for generating a release"
41        echo "     - $0 release 3.09 will generate the 3.09 release binary"
42        echo "     - $0 release 3.09rc2 will generate the binary for 3.09 release candidate 2"
43        echo "     - $0 -h|--help|-? will print these usage instructions"
44        echo "*************************************************"
45    elif test "$1" == "2" ; then
46        echo "Caveat 2";
47        ./envi gs2-caveat >> /Volumes/Research/nzdl/logs/caveats.log 2>&1;
48    elif test "$1" == "3" ; then
49        echo "Caveat 3";
50        ./envi gs3-caveat >> /Volumes/Research/nzdl/logs/caveats.log 2>&1;     
51    elif test "$1" == "release" ; then
52        if test -z "$2" ; then
53            echo ""
54            echo "USAGE: Run as $0 $1 <gs-release-version>[rc#]"
55            echo ""
56        else
57            echo "$*"; # "Release folder"
58            export TASK_NAME=release;
59            ./envi $* >> /Volumes/Research/nzdl/logs/release-$2.log 2>&1;
60        fi
61    else
62        echo "Unrecognised parameter $1 passed in. Run $0 --help|-h|-? for usage"
63    fi
64else
65    echo "Both caveats";
66    ./envi caveats >> /Volumes/Research/nzdl/logs/caveats.log 2>&1;
67fi
68
69
70
71#./envi caveats >> /Volumes/Research/nzdl/logs/caveats.log 2>&1
72#./envi gs3-caveat >> /Volumes/Research/nzdl/logs/caveats.log 2>&1
73#./envi gs2-caveat >> /Volumes/Research/nzdl/logs/caveats.log 2>&1
74
Note: See TracBrowser for help on using the browser.