Changeset 10289:4d3e15b67a7f in orange


Ignore:
Timestamp:
02/17/12 14:57:44 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
rebase_source:
60a47c27246bf9aab9b8d34b292070509d0b1ec4
Message:

Don't build if there is already a bundle with the same revision. Publish the bundle on the web.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install-scripts/mac/bundle-daily-build-hg.sh

    r10270 r10289  
    44# 
    55 
    6 BUNDLE="/private/tmp/orange-bundle-hg-tip.dmg" 
    76 
    8 #trap "echo \"Script failed\"" ERR 
     7trap "echo \"Script failed\"" ERR 
    98 
    10 # Create the bundle 
    11 ./bundle-build-hg.sh /private/tmp tip $BUNDLE 
     9# If possible get the orange tip revision number and check if the bundle already exists 
     10if [ -e /private/tmp/repos/orange ]; then 
     11    # Try to pull and update (pull returns 1 if no changesets) 
     12    hg pull --update -R /private/tmp/repos/orange || true 
     13    DAILY_REVISION=`hg log -r tip -R /private/tmp/repos/orange | grep 'changeset:' | cut -d ' ' -f 4 | cut -d ':' -f 1` 
     14else 
     15    DAILY_REVISION="tip" 
     16fi 
    1217 
    13 # Use local repo from the build process to get the revision 
    14 DAILY_REVISION=`hg log -r tip -R /private/tmp/repos/orange | grep 'changeset:' | cut -d ' ' -f 4 | cut -d ':' -f 1` 
     18BUNDLE="/private/tmp/orange-bundle-hg-$DAILY_REVISION.dmg" 
     19         
     20# Create the bundle if it does not yet exist 
     21if [[ ! -e /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg || $DAILY_REVISION -eq "tip" ]]; then 
     22    echo "Building orange revision $DAILY_REVISION" 
     23    ./bundle-build-hg.sh /private/tmp tip $BUNDLE 
     24     
     25    # Get the revision again in case it was "tip" 
     26    DAILY_REVISION=`hg log -r tip -R /private/tmp/repos/orange | grep 'changeset:' | cut -d ' ' -f 4 | cut -d ':' -f 1` 
    1527 
    1628 
    17 # TODO: Should be called only on a daily build server and not if building locally 
    18 /Users/ailabc/mount-dirs.sh 
     29    # TODO: Should be called only on a daily build server and not if building locally 
     30    /Users/ailabc/mount-dirs.sh 
    1931 
    20 echo "Removing old versions of bundles." 
    21 # (Keeps last 5 versions.) 
    22 perl -e 'unlink ((reverse sort </Volumes/download/orange-bundle-hg-0*.dmg>)[5..10000])' 
     32    echo "Removing old versions of bundles." 
     33    # (Keeps last 5 versions.) 
     34    perl -e 'unlink ((reverse sort </Volumes/download/orange-bundle-hg-0*.dmg>)[5..10000])' 
    2335 
    24 if [ -e $BUNDLE ]; then 
    2536    echo "Moving bundle to the download directory." 
    2637    mv $BUNDLE /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg 
     
    2940    chmod +r /Volumes/download/orange-bundle-hg-0.0.$DAILY_REVISION.dmg 
    3041     
    31     # Dont publish the bundles for now 
    32      
    33     #echo "Registering new bundles." 
    34     #egrep -v '^(MAC_STABLE|MAC_DAILY)=' /Volumes/download/filenames_mac.set > /Volumes/download/filenames_mac.set.new 
    35     #echo "MAC_STABLE=orange-bundle-1.0b.$STABLE_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new 
    36     #echo "MAC_DAILY=orange-bundle-svn-0.0.$DAILY_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new 
    37     #mv /Volumes/download/filenames_mac.set.new /Volumes/download/filenames_mac.set 
     42    echo "Registering new bundles." 
     43    egrep -v '^(MAC_DAILY)=' /Volumes/download/filenames_mac.set > /Volumes/download/filenames_mac.set.new 
     44    echo "MAC_DAILY=orange-bundle-hg-0.0.$DAILY_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new 
     45    mv /Volumes/download/filenames_mac.set.new /Volumes/download/filenames_mac.set 
    3846 
     47else 
     48    echo "The bundle with revision $DAILY_REVISION already exists." 
    3949fi 
Note: See TracChangeset for help on using the changeset viewer.