Changeset 10556:f9d69e88bc23 in orange


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.

Location:
install-scripts/mac
Files:
3 edited

Legend:

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

    r8096 r10556  
    1 #!/bin/bash 
     1#!/bin/bash -e 
    22# 
    3 # Should be run as: sudo ./dailyrun-finkonly.sh 
    4 # 
     3# $1 workdir 
     4# $2 force 
     5# $3 local 
     6 
     7WORK_DIR=${1:-"/private/tmp"} 
     8FORCE=$2 
     9LOCAL=$3 
    510 
    611test -r /sw/bin/init.sh && . /sw/bin/init.sh 
     12 
     13export PATH=$HOME/bin:$PATH 
     14 
     15if [ $LOCAL ]; then 
     16    PUBLISH_DIR=$WORK_DIR/download 
     17    LOG_DIR=$WORK_DIR/logs 
     18    mkdir -p $PUBLISH_DIR 
     19    mkdir -p $LOG_DIR 
     20else 
     21    PUBLISH_DIR=/Volumes/download 
     22    LOG_DIR=/Volumes/download/buildLogs/osx 
     23fi 
     24 
     25if [ ! -e $WORK_DIR ]; then 
     26    mkdir -p $WORK_DIR 
     27fi 
     28 
     29SOURCES_DIR=$PUBLISH_DIR/sources 
     30 
     31# Get versions from PKG-INFO files (these are updated by dailyrun-sources.sh) 
     32ORANGE_VERSION=`grep "^Version:" $SOURCES_DIR/Orange.egg-info/PKG-INFO | cut -d " " -f 2` 
     33BIOINFORMATICS_VERSION=`grep "^Version:" $SOURCES_DIR/Orange_Bioinformatics.egg-info/PKG-INFO | cut -d " " -f 2` 
     34TEXT_VERSION=`grep "^Version:" $SOURCES_DIR/Orange_Text_Mining.egg-info/PKG-INFO | cut -d " " -f 2` 
     35 
     36 
     37# Source filenames 
     38ORANGE_SOURCE="Orange-${ORANGE_VERSION}.tar.gz" 
     39BIOINFORMATICS_SOURCE="Orange-Bioinformatics-${BIOINFORMATICS_VERSION}.tar.gz" 
     40TEXT_SOURCE="Orange-Text-Mining-${TEXT_VERSION}.tar.gz" 
     41 
     42 
     43# Get source packages md5 checksum 
     44ORANGE_SOURCE_MD5=`md5 -q $SOURCES_DIR/$ORANGE_SOURCE` 
     45BIOINFORMATICS_SOURCE_MD5=`md5 -q $SOURCES_DIR/$BIOINFORMATICS_SOURCE` 
     46TEXT_SOURCE_MD5=`md5 -q $SOURCES_DIR/$TEXT_SOURCE` 
    747 
    848MAC_VERSION=`sw_vers -productVersion | cut -d '.' -f 2` 
    949ARCH=`perl -MFink::FinkVersion -e 'print Fink::FinkVersion::get_arch'` 
    1050 
    11 defaults write com.apple.desktopservices DSDontWriteNetworkStores true 
    1251 
    13 /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     52FINK_ROOT=/sw 
    1453 
    15 /Users/ailabc/fink-daily-build.sh &> /private/tmp/fink-daily-build.log 
    16 EXIT_VALUE=$? 
     54if [ ! $LOCAL ]; then 
     55    # Compare with the published info files 
     56    BASE="http://orange.biolab.si/fink/dists/$ARCH/main/finkinfo" 
     57else 
     58    # Compare with the local info files 
     59    BASE="file://$FINK_ROOT/fink/dists/local/main/finkinfo" 
     60fi 
    1761 
    18 /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     62OLD_ORANGE_VERSION=`curl --silent $BASE/orange-gui-hg-py.info | grep "Version: " | cut -d" " -f 2` 
     63OLD_BIOINFORMATICS_VERSION=`curl --silent $BASE/orange-bioinformatics-gui-hg-py.info | grep "Version: " | cut -d" " -f 2` 
     64OLD_TEXT_VERSION=`curl --silent $BASE/orange-text-gui-hg-py.info | grep "Version: " | cut -d" " -f 2` 
    1965 
    20 echo "Orange (fink $MAC_VERSION $ARCH) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    21 date >> "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    22 cat /private/tmp/fink-daily-build.log >> "/Volumes/download/buildLogs/osx/fink-$MAC_VERSION-$ARCH-daily-build.log" 
    23 (($EXIT_VALUE)) && echo "Running fink-daily-build.sh failed" 
     66if [[ $OLD_ORANGE_VERSION < ORANGE_VERSION ]]; then 
     67    NEW_ORANGE=1 
     68fi 
     69 
     70if [[ $OLD_BIOINFORMATICS_VERSION < BIOINFORMATICS_VERSION ]]; then 
     71    NEW_BIOINFORMATICS=1 
     72fi 
     73 
     74if [[ $OLD_TEXT_VERSION < TEXT_VERSION ]]; then 
     75    NEW_TEXT=1 
     76fi 
     77 
     78# Base url for sources in fink .info files 
     79if [ $LOCAL ]; then 
     80    BASE_URL="file://$PUBLISH_DIR/sources" 
     81else 
     82    BASE_URL="http://orange.biolab.si/download/sources" 
     83fi 
     84 
     85# Update the local finkinfo  
     86# Local info files will be moved to biolab/main/finkinfo in fink-daily-build-packages.sh 
     87FINK_INFO_DIR="$FINK_ROOT/fink/dists/local/main/finkinfo" 
     88 
     89if [ ! -e $FINK_INFO_DIR ]; then 
     90    mkdir -p $FINK_INFO_DIR 
     91fi 
     92 
     93# Directory where fink .info templates are 
     94FINK_TEMPLATES=$WORK_DIR/repos/orange/install-scripts/mac/fink 
     95 
     96FINK_LOG=$WORK_DIR/fink-daily-build.log 
     97 
     98echo "" > $FINK_LOG 
     99 
     100if [[ $NEW_ORANGE || $FORCE ]]; then 
     101    FINK_ORANGE_SOURCE_TEMPLATE="Orange-%v.tar.gz" 
     102    ./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 >> $FINK_LOG 2>&1 
     103fi 
     104 
     105if [[ $NEW_BIOINFORMATICS || $FORCE ]]; then 
     106    FINK_BIOINFORMATICS_SOURCE_TEMPLATE="Orange-Bioinformatics-%v.tar.gz" 
     107    ./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 >> $FINK_LOG 2>&1 
     108fi 
     109 
     110if [[ $NEW_TEXT || $FORCE ]]; then 
     111    FINK_TEXT_SOURCE_TEMPLATE="Orange-Text-Mining-%v.tar.gz" 
     112    ./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 >> $FINK_LOG 2>&1 
     113fi 
     114 
     115if [ ! $LOCAL ]; then 
     116    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     117fi 
     118 
     119 
     120## daily fink build 
     121if [ ! $LOCAL ]; then 
     122    ./fink-daily-build-packages.sh &> $WORK_DIR/fink-daily-build-packages.log 
     123    EXIT_VALUE=$? 
     124fi 
     125 
     126if [ ! $LOCAL ]; then 
     127    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; } 
     128fi 
     129 
     130echo "Orange (fink $MAC_VERSION $ARCH) [$EXIT_VALUE]" > "$LOG_DIR/fink-$MAC_VERSION-$ARCH-daily-build.log" 
     131date >> "$LOG_DIR/fink-$MAC_VERSION-$ARCH-daily-build.log" 
     132cat $WORK_DIR/fink-daily-build-packages.log >> "$LOG_DIR/fink-$MAC_VERSION-$ARCH-daily-build.log" 
     133(($EXIT_VALUE)) && echo "Running fink-daily-build-packages.sh failed" 
    24134 
    25135# Zero exit value 
  • 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 
  • install-scripts/mac/fink-daily-build-packages.sh

    • Property exe set to *
    r10500 r10556  
    7575rm -f $FINK_ROOT/fink/dists/biolab/main/finkinfo/all.tgz 
    7676 
    77 # Copy info files from local/main/finkinfo 
     77# Move info files from local/main/finkinfo (put there by dailyru[-finkonly].sh 
    7878echo "Updating new fink info files." 
    7979mv $FINK_ROOT/fink/dists/local/main/finkinfo/*.info $FINK_ROOT/fink/dists/biolab/main/finkinfo/ 
Note: See TracChangeset for help on using the changeset viewer.