Changeset 10501:24030273b4b6 in orange


Ignore:
Timestamp:
03/13/12 11:35:36 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Updated dailyrun script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install-scripts/mac/dailyrun.sh

    r10345 r10501  
    1 #!/bin/bash 
     1#!/bin/bash -e 
    22# 
    33# Should be run as: sudo ./dailyrun.sh 
    44# 
     5 
     6#FORCE=true 
     7#LOCAL=true 
    58 
    69test -r /sw/bin/init.sh && . /sw/bin/init.sh 
     
    811export PATH=$HOME/bin:$PATH 
    912 
    10 STABLE_REVISION_1=`svn info --non-interactive http://orange.biolab.si/svn/orange/branches/ver1.0/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4` 
    11 # svn info does not return proper exit status on an error so we check it this way 
    12 [ "$STABLE_REVISION_1" ] || exit 1 
    13 STABLE_REVISION_2=`svn info --non-interactive http://orange.biolab.si/svn/orange/externals/branches/ver1.0/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4` 
    14 # svn info does not return proper exit status on an error so we check it this way 
    15 [ "$STABLE_REVISION_2" ] || exit 1 
     13WORK_DIR=/private/tmp/repos 
    1614 
    17 if [[ $STABLE_REVISION_1 -gt $STABLE_REVISION_2 ]]; then 
    18     STABLE_REVISION=$STABLE_REVISION_1 
     15if [ $LOCAL ]; then 
     16    PUBLISH_DIR=/private/tmp/download 
     17    mkdir -p $PUBLISH_DIR 
    1918else 
    20     STABLE_REVISION=$STABLE_REVISION_2 
     19    PUBLISH_DIR=/Volumes/download 
    2120fi 
    2221 
    23 DAILY_REVISION_1=`svn info --non-interactive http://orange.biolab.si/svn/orange/trunk/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4` 
    24 # svn info does not return proper exit status on an error so we check it this way 
    25 [ "$DAILY_REVISION_1" ] || exit 1 
    26 DAILY_REVISION_2=`svn info --non-interactive http://orange.biolab.si/svn/orange/externals/trunk/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4` 
    27 # svn info does not return proper exit status on an error so we check it this way 
    28 [ "$DAILY_REVISION_2" ] || exit 1 
     22if [ ! -e $WORK_DIR ]; then 
     23    mkdir -p $WORK_DIR 
     24fi 
    2925 
    30 if [[ $DAILY_REVISION_1 -gt $DAILY_REVISION_2 ]]; then 
    31     DAILY_REVISION=$DAILY_REVISION_1 
    32 else 
    33     DAILY_REVISION=$DAILY_REVISION_2 
    34 fi 
     26 
     27# Build source packages 
     28./build-source.sh https://bitbucket.org/biolab/orange orange tip $WORK_DIR Orange 
     29./build-source.sh https://bitbucket.org/biolab/orange-addon-bioinformatics bioinformatics tip $WORK_DIR Orange-Bioinformatics 
     30./build-source.sh https://bitbucket.org/biolab/orange-addon-text text tip $WORK_DIR Orange-Text-Mining 
     31 
     32 
     33# Get versions from PKG-INFO files 
     34ORANGE_VERSION=`grep "^Version:" $WORK_DIR/Orange.egg-info/PKG-INFO | cut -d " " -f 2` 
     35BIOINFORMATICS_VERSION=`grep "^Version:" $WORK_DIR/Orange_Bioinformatics.egg-info/PKG-INFO | cut -d " " -f 2` 
     36TEXT_VERSION=`grep "^Version:" $WORK_DIR/Orange_Text_Mining.egg-info/PKG-INFO | cut -d " " -f 2` 
     37 
     38 
     39# Source filenames 
     40ORANGE_SOURCE="Orange-${ORANGE_VERSION}.tar.gz" 
     41BIOINFORMATICS_SOURCE="Orange-Bioinformatics-${BIOINFORMATICS_VERSION}.tar.gz" 
     42TEXT_SOURCE="Orange-Text-Mining-${TEXT_VERSION}.tar.gz" 
     43 
     44 
     45# Get source packages md5 checksum 
     46ORANGE_SOURCE_MD5=`md5 -q $WORK_DIR/$ORANGE_SOURCE` 
     47BIOINFORMATICS_SOURCE_MD5=`md5 -q $WORK_DIR/$BIOINFORMATICS_SOURCE` 
     48TEXT_SOURCE_MD5=`md5 -q $WORK_DIR/$TEXT_SOURCE` 
     49 
    3550 
    3651MAC_VERSION=`sw_vers -productVersion | cut -d '.' -f 2` 
     
    3954defaults write com.apple.desktopservices DSDontWriteNetworkStores true 
    4055 
    41 /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     56if [ ! $LOCAL ]; then 
     57    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     58fi 
    4259 
    43 ## Daily build from hg 
    44 /Users/ailabc/bundle-daily-build-hg.sh &> /private/tmp/bundle-daily-build.log 
    45 EXIT_VALUE=$? 
     60# Base url for sources 
     61if [ $LOCAL ]; then 
     62    BASE_URL="file://$PUBLISH_DIR/sources" 
     63else 
     64    BASE_URL="http://orange.biolab.si/download/sources" 
     65fi 
    4666 
    47 /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     67# Base dir for sources 
     68SOURCES_DIR=$PUBLISH_DIR/sources 
     69 
     70 
     71# Publish sources 
     72 
     73if [ ! -e $SOURCES_DIR ]; then 
     74    mkdir -p $SOURCES_DIR 
     75fi 
     76 
     77if [[ ! -e $SOURCES_DIR/$ORANGE_SOURCE || $FORCE]]; then 
     78    cp $WORK_DIR/$ORANGE_SOURCE $SOURCES_DIR/$ORANGE_SOURCE 
     79    NEW_ORANGE=1 
     80fi 
     81 
     82if [[ ! -e $SOURCES_DIR/BIOINFORMATICS_SOURCE || $FORCE ]]; then 
     83    cp $WORK_DIR/$BIOINFORMATICS_SOURCE $SOURCES_DIR/$BIOINFORMATICS_SOURCE 
     84    NEW_BIOINFORMATICS=1 
     85fi 
     86 
     87if [[ ! -e $SOURCES_DIR/TEXT_SOURCE || $FORCE ]]; then 
     88    cp $WORK_DIR/$TEXT_SOURCE $SOURCES_DIR/$TEXT_SOURCE 
     89    NEW_TEXT=1 
     90fi 
     91 
     92FINK_ROOT=/sw 
     93 
     94# Update the local finkinfo  
     95# Local info files will be copied to biolab/main/finkinfo in fink-daily-build-packages.sh 
     96FINK_INFO_DIR="$FINK_ROOT/fink/dists/local/main/finkinfo" 
     97 
     98if [ ! -e $FINK_INFO_DIR ]; then 
     99    mkdir -p $FINK_INFO_DIR 
     100fi 
     101 
     102# Directory where fink .info templates are 
     103FINK_TEMPLATES=$WORK_DIR/orange/install-scripts/mac/fink 
     104 
     105if [[ $NEW_ORANGE || $FORCE ]]; then 
     106    FINK_ORANGE_SOURCE_TEMPLATE="Orange-%v.tar.gz" 
     107    ./fink-register-info.sh "$FINK_TEMPLATES/orange-gui-hg-py.info" $BASE_URL/$FINK_ORANGE_SOURCE_TEMPLATE $ORANGE_SOURCE_MD5 $ORANGE_VERSION $FINK_INFO_DIR/orange-gui-hg-py.info 
     108fi 
     109 
     110if [[ $NEW_BIOINFORMATICS || $FORCE ]]; then 
     111    FINK_BIOINFORMATICS_SOURCE_TEMPLATE="Orange-Bioinformatics-%v.tar.gz" 
     112    ./fink-register-info.sh "$FINK_TEMPLATES/orange-bioinformatics-gui-hg-py.info" $BASE_URL/$FINK_BIOINFORMATICS_SOURCE_TEMPLATE $BIOINFORMATICS_SOURCE_MD5 $BIOINFORMATICS_VERSION $FINK_INFO_DIR/orange-bioinformatics-gui-hg-py.info 
     113fi 
     114 
     115if [[ $NEW_TEXT || $FORCE ]]; then 
     116    FINK_TEXT_SOURCE_TEMPLATE="Orange-Text-Mining-%v.tar.gz" 
     117    ./fink-register-info.sh "$FINK_TEMPLATES/orange-text-gui-hg-py.info" $BASE_URL/$FINK_TEXT_SOURCE_TEMPLATE $TEXT_SOURCE_MD5 $TEXT_VERSION $FINK_INFO_DIR/orange-text-gui-hg-py.info 
     118fi 
     119 
     120if [ ! $LOCAL ]; then 
     121    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     122fi 
     123 
     124 
     125## Daily bundle build from hg 
     126if [[ $NEW_ORANGE || $NEW_BIOINFORMATICS || $NEW_TEXT || $FORCE ]]; then 
     127    /Users/ailabc/bundle-daily-build-hg.sh &> /private/tmp/bundle-daily-build.log 
     128    EXIT_VALUE=$? 
     129fi 
     130 
     131if [ ! $LOCAL ]; then 
     132    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     133fi 
    48134 
    49135echo "Orange (bundle $MAC_VERSION from hg) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build-hg.log" 
     
    53139 
    54140 
    55 #/Users/ailabc/bundle-daily-build.sh $STABLE_REVISION $DAILY_REVISION &> /private/tmp/bundle-daily-build.log 
    56 #EXIT_VALUE=$? 
    57 # 
    58 #/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
    59 # 
    60 #echo "Orange (bundle $MAC_VERSION) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build.log" 
    61 #date >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build.log" 
    62 #cat /private/tmp/bundle-daily-build.log >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build.log" 
    63 #(($EXIT_VALUE)) && echo "Running bundle-daily-build.sh failed" 
    64 # 
    65 #/Users/ailabc/bundle-64bit-daily-build.sh $DAILY_REVISION &> /private/tmp/bundle-64bit-daily-build.log 
    66 #EXIT_VALUE=$? 
     141## daily fink build 
    67142 
    68 #/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
    69 # 
    70 #echo "Orange (bundle $MAC_VERSION 64bit) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-64bit-daily-build.log" 
    71 #date >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-64bit-daily-build.log" 
    72 #cat /private/tmp/bundle-64bit-daily-build.log >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-64bit-daily-build.log" 
    73 #(($EXIT_VALUE)) && echo "Running bundle-64bit-daily-build.sh failed" 
    74  
    75 /Users/ailabc/fink-daily-build.sh $STABLE_REVISION $DAILY_REVISION &> /private/tmp/fink-daily-build.log 
     143/Users/ailabc/fink-daily-build-packages.sh &> /private/tmp/fink-daily-build-packages.log 
    76144EXIT_VALUE=$? 
    77145 
    78 /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     146if [ ! $LOCAL ]; then 
     147    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     148fi 
    79149 
    80150echo "Orange (fink $MAC_VERSION $ARCH) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    81151date >> "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    82 cat /private/tmp/fink-daily-build.log >> "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
     152cat /private/tmp/fink-daily-build-packages.log >> "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    83153(($EXIT_VALUE)) && echo "Running fink-daily-build.sh failed" 
    84154 
Note: See TracChangeset for help on using the changeset viewer.