Ticket #12488: 12488_commit.patch

File 12488_commit.patch, 1.8 KB (added by jdemeyer, 4 years ago)
  • sage-make_devel_packages

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1328870865 28800
    # Node ID 870c0d20d94d71adfe49376b2e20aee309df326a
    # Parent  aa5da869b41cfd4f88262d3035b9cab0b28e1383
    Make sage-make_devel_packages not fail if there is nothing to commit
    
    diff --git a/sage-make_devel_packages b/sage-make_devel_packages
    a b  
    3939DESTINATION=`pwd`
    4040PKG="$DESTINATION"
    4141
    42 # NEW SAGE SOURCE PACKAGE
     42# NEW SAGE LIBRARY PACKAGE
    4343if [ -d "$SAGE_ROOT"/devel/sage ]; then
    4444   cd "$SAGE_ROOT"/devel/sage
    4545   hg diff
    4646   hg status
    4747   hg tag "$SAGE_VERSION"
    4848   hg commit -m "$SAGE_VERSION"
    49    #./sage-push
     49   if [ $? -gt 1 ]; then  # Status 1 is returned when there are no changes
     50       echo >&2 "Error committing Sage library repository."
     51       exit 1
     52   fi
     53
    5054   ./spkg-dist "$SAGE_VERSION" "$SAGE_ROOT"
    5155   if [ $? -ne 0 ]; then
    52        echo "Error building the Sage source code package"
     56       echo "Error building the Sage library package"
    5357       exit 1
    5458   fi
    5559   mv dist/sage-"$SAGE_VERSION".spkg "$DESTINATION"/
     
    6872   hg status
    6973   hg tag "$SAGE_VERSION"
    7074   hg commit -m "$SAGE_VERSION"
    71  
    72    #./sage-push
     75   if [ $? -gt 1 ]; then  # Status 1 is returned when there are no changes
     76       echo >&2 "Error committing extcode repository."
     77       exit 1
     78   fi
     79
    7380   ./spkg-dist "$SAGE_VERSION" "$SAGE_ROOT"
    7481   if [ $? -ne 0 ]; then
    7582       echo "Error building the extcode package"
     
    93100SCRIPTS=sage_scripts-"$SAGE_VERSION"
    94101cd "$SAGE_ROOT"/local/bin/
    95102
    96 #./sage-push
    97103hg diff
    98104hg status
    99105hg tag "$SAGE_VERSION"
    100106hg commit -m "$SAGE_VERSION"
    101 
    102 if [ $? -ne 0 ]; then
    103     echo "Error pushing scripts repository."
     107if [ $? -gt 1 ]; then  # Status 1 is returned when there are no changes
     108    echo >&2 "Error committing scripts repository."
    104109    exit 1
    105110fi
    106111