Ignore:
Timestamp:
03/16/12 15:10:00 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
rebase_source:
dd2bda2c032bede440d9ef9642276bb76a021049
Message:

Updated dailyrun scripts.

File:
1 edited

Legend:

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

    r10534 r10556  
    33# Should be run as: sudo ./dailyrun.sh 
    44# 
     5# $1 workdir 
     6# $2 force 
     7# $3 local 
    58 
    6 #FORCE=true 
    7 #LOCAL=true 
     9WORK_DIR=${1:-"/private/tmp"} 
     10FORCE=$2 
     11LOCAL=$3 
    812 
    913test -r /sw/bin/init.sh && . /sw/bin/init.sh 
     
    1115export PATH=$HOME/bin:$PATH 
    1216 
    13 WORK_DIR=/private/tmp/repos 
    14  
    1517if [ $LOCAL ]; then 
    16     PUBLISH_DIR=/private/tmp/download 
     18    PUBLISH_DIR=$WORK_DIR/download 
     19    LOG_DIR=$WORK_DIR/logs 
    1720    mkdir -p $PUBLISH_DIR 
     21    mkdir -p $LOG_DIR 
    1822else 
    1923    PUBLISH_DIR=/Volumes/download 
     24    LOG_DIR=/Volumes/download/buildLogs/osx 
    2025fi 
    2126 
     
    2429fi 
    2530 
    26 SOURCE_LOG=/private/tmp/sources-daily-build.log 
    2731 
    28 # Build source packages 
    29 ./build-source.sh https://bitbucket.org/biolab/orange orange tip $WORK_DIR Orange > $SOURCE_LOG 2>&1 
    30 EXIT_VALUE1=$? 
    31 ./build-source.sh https://bitbucket.org/biolab/orange-addon-bioinformatics bioinformatics tip $WORK_DIR Orange-Bioinformatics >> $SOURCE_LOG 2>&1 
    32 EXIT_VALUE2=$? 
    33 ./build-source.sh https://bitbucket.org/biolab/orange-addon-text text tip $WORK_DIR Orange-Text-Mining >> $SOURCE_LOG 2>&1 
    34 EXIT_VALUE3=$? 
     32SOURCE_LOG=$WORK_DIR/sources-daily-build.log 
     33 
     34./dailyrun-sources.sh $WORK_DIR $FORCE $LOCAL &> $SOURCE_LOG 
     35EXIT_VALUE=$? 
     36 
     37defaults write com.apple.desktopservices DSDontWriteNetworkStores true 
    3538 
    3639if [ ! $LOCAL ]; then 
     
    3841fi 
    3942 
    40 echo "Orange (sources) [$EXIT_VALUE1 $EXIT_VALUE2 $EXIT_VALUE3]" > "/Volumes/download/buildLogs/osx/source-daily-build-hg.log" 
    41 date >> "/Volumes/download/buildLogs/osx/source-daily-build-hg.log" 
    42 cat $SOURCE_LOG > "/Volumes/download/buildLogs/osx/source-daily-build-hg.log" 
    43 (($EXIT_VALUE1 + $EXIT_VALUE2 + $EXIT_VALUE3)) && echo "Daily sources failed" 
     43echo "Orange (sources) [ $EXIT_VALUE ]" > "$LOG_DIR/source-daily-build-hg.log" 
     44date >> "$LOG_DIR/source-daily-build-hg.log" 
     45cat $SOURCE_LOG > "$LOG_DIR//source-daily-build-hg.log" 
     46(($EXIT_VALUE)) && echo "Daily sources failed" 
    4447 
    45 # Get versions from PKG-INFO files 
    46 ORANGE_VERSION=`grep "^Version:" $WORK_DIR/Orange.egg-info/PKG-INFO | cut -d " " -f 2` 
    47 BIOINFORMATICS_VERSION=`grep "^Version:" $WORK_DIR/Orange_Bioinformatics.egg-info/PKG-INFO | cut -d " " -f 2` 
    48 TEXT_VERSION=`grep "^Version:" $WORK_DIR/Orange_Text_Mining.egg-info/PKG-INFO | cut -d " " -f 2` 
     48SOURCES_DIR=$PUBLISH_DIR/sources 
     49 
     50# Get versions from PKG-INFO files (these are updated by dailyrun-sources) 
     51ORANGE_VERSION=`grep "^Version:" $SOURCES_DIR/Orange.egg-info/PKG-INFO | cut -d " " -f 2` 
     52BIOINFORMATICS_VERSION=`grep "^Version:" $SOURCES_DIR/Orange_Bioinformatics.egg-info/PKG-INFO | cut -d " " -f 2` 
     53TEXT_VERSION=`grep "^Version:" $SOURCES_DIR/Orange_Text_Mining.egg-info/PKG-INFO | cut -d " " -f 2` 
    4954 
    5055 
     
    5661 
    5762# Get source packages md5 checksum 
    58 ORANGE_SOURCE_MD5=`md5 -q $WORK_DIR/$ORANGE_SOURCE` 
    59 BIOINFORMATICS_SOURCE_MD5=`md5 -q $WORK_DIR/$BIOINFORMATICS_SOURCE` 
    60 TEXT_SOURCE_MD5=`md5 -q $WORK_DIR/$TEXT_SOURCE` 
     63ORANGE_SOURCE_MD5=`md5 -q $SOURCES_DIR/$ORANGE_SOURCE` 
     64BIOINFORMATICS_SOURCE_MD5=`md5 -q $SOURCES_DIR/$BIOINFORMATICS_SOURCE` 
     65TEXT_SOURCE_MD5=`md5 -q $SOURCES_DIR/$TEXT_SOURCE` 
     66 
     67## Daily bundle build from hg (for now always until versioning is established). 
     68if [[ true || $NEW_ORANGE || $NEW_BIOINFORMATICS || $NEW_TEXT || $FORCE ]]; then 
     69    /Users/ailabc/bundle-daily-build-hg.sh &> $WORK_DIR/bundle-daily-build.log 
     70    EXIT_VALUE=$? 
     71fi 
     72 
     73if [ ! $LOCAL ]; then 
     74    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     75fi 
     76 
     77echo "Orange (bundle $MAC_VERSION from hg) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build-hg.log" 
     78date >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build-hg.log" 
     79cat $WORK_DIR/bundle-daily-build.log >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build-hg.log" 
     80(($EXIT_VALUE)) && echo "Running bundle-daily-build-hg.sh failed" 
    6181 
    6282 
     
    6484ARCH=`perl -MFink::FinkVersion -e 'print Fink::FinkVersion::get_arch'` 
    6585 
    66 defaults write com.apple.desktopservices DSDontWriteNetworkStores true 
     86FINK_ROOT=/sw 
    6787 
    6888if [ ! $LOCAL ]; then 
    69     /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     89    # Compare with the published info files 
     90    BASE="http://orange.biolab.si/fink/dists/$ARCH/main/finkinfo" 
     91else 
     92    # Compare with the local info files 
     93    BASE="file://$FINK_ROOT/fink/dists/local/main/finkinfo" 
    7094fi 
    7195 
    72 # Base url for sources 
     96 
     97OLD_ORANGE_VERSION=`curl --silent $BASE/orange-gui-hg-py.info | grep "Version: " | cut -d" " -f 2` 
     98OLD_BIOINFORMATICS_VERSION=`curl --silent $BASE/orange-bioinformatics-gui-hg-py.info | grep "Version: " | cut -d" " -f 2` 
     99OLD_TEXT_VERSION=`curl --silent $BASE/orange-text-gui-hg-py.info | grep "Version: " | cut -d" " -f 2` 
     100 
     101if [[ $OLD_ORANGE_VERSION < ORANGE_VERSION ]]; then 
     102    NEW_ORANGE=1 
     103fi 
     104 
     105if [[ $OLD_BIOINFORMATICS_VERSION < BIOINFORMATICS_VERSION ]]; then 
     106    NEW_BIOINFORMATICS=1 
     107fi 
     108 
     109if [[ $OLD_TEXT_VERSION < TEXT_VERSION ]]; then 
     110    NEW_TEXT=1 
     111fi 
     112 
     113 
     114# Base url for sources in fink .info files 
    73115if [ $LOCAL ]; then 
    74116    BASE_URL="file://$PUBLISH_DIR/sources" 
     
    77119fi 
    78120 
    79 # Base dir for sources 
    80 SOURCES_DIR=$PUBLISH_DIR/sources 
    81  
    82  
    83 # Publish sources 
    84  
    85 if [ ! -e $SOURCES_DIR ]; then 
    86     mkdir -p $SOURCES_DIR 
    87 fi 
    88  
    89 if [[ ! -e $SOURCES_DIR/$ORANGE_SOURCE || $FORCE ]]; then 
    90     cp $WORK_DIR/$ORANGE_SOURCE $SOURCES_DIR/$ORANGE_SOURCE 
    91     NEW_ORANGE=1 
    92 fi 
    93  
    94 if [[ ! -e $SOURCES_DIR/BIOINFORMATICS_SOURCE || $FORCE ]]; then 
    95     cp $WORK_DIR/$BIOINFORMATICS_SOURCE $SOURCES_DIR/$BIOINFORMATICS_SOURCE 
    96     NEW_BIOINFORMATICS=1 
    97 fi 
    98  
    99 if [[ ! -e $SOURCES_DIR/TEXT_SOURCE || $FORCE ]]; then 
    100     cp $WORK_DIR/$TEXT_SOURCE $SOURCES_DIR/$TEXT_SOURCE 
    101     NEW_TEXT=1 
    102 fi 
    103  
    104 FINK_ROOT=/sw 
    105  
    106121# Update the local finkinfo  
    107 # Local info files will be copied to biolab/main/finkinfo in fink-daily-build-packages.sh 
     122# Local info files will be moved to biolab/main/finkinfo in fink-daily-build-packages.sh 
    108123FINK_INFO_DIR="$FINK_ROOT/fink/dists/local/main/finkinfo" 
    109124 
     
    115130FINK_TEMPLATES=$WORK_DIR/orange/install-scripts/mac/fink 
    116131 
    117 FINK_LOG=/private/tmp/bundle-daily-build.log 
     132FINK_LOG=$WORK_DIR/fink-daily-build.log 
    118133echo "" > $FINK_LOG 
    119134 
     
    138153 
    139154 
    140 ## Daily bundle build from hg 
    141 if [[ $NEW_ORANGE || $NEW_BIOINFORMATICS || $NEW_TEXT || $FORCE ]]; then 
    142     /Users/ailabc/bundle-daily-build-hg.sh &> /private/tmp/bundle-daily-build.log 
    143     EXIT_VALUE=$? 
    144 fi 
    145  
    146 if [ ! $LOCAL ]; then 
    147     /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
    148 fi 
    149  
    150 echo "Orange (bundle $MAC_VERSION from hg) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build-hg.log" 
    151 date >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build-hg.log" 
    152 cat /private/tmp/bundle-daily-build.log >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build-hg.log" 
    153 (($EXIT_VALUE)) && echo "Running bundle-daily-build-hg.sh failed" 
    154  
    155  
    156155## daily fink build 
    157156 
    158 /Users/ailabc/fink-daily-build-packages.sh &> /private/tmp/fink-daily-build-packages.log 
     157./fink-daily-build-packages.sh &> $WORK_DIR/fink-daily-build-packages.log 
    159158EXIT_VALUE=$? 
    160159 
     
    165164echo "Orange (fink $MAC_VERSION $ARCH) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    166165date >> "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    167 cat /private/tmp/fink-daily-build-packages.log >> "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
     166cat $WORK_DIR/fink-daily-build-packages.log >> "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    168167(($EXIT_VALUE)) && echo "Running fink-daily-build.sh failed" 
    169168 
Note: See TracChangeset for help on using the changeset viewer.