Changeset 23056


Ignore:
Timestamp:
08/06/18 14:24:17 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: better way to handle changed files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/jenkins/jenkins.sh

    r22761 r23056  
    5555
    5656        #Get changes from jenkins itself (svn requires credentials)
    57         rm -rf changes
    58         wget $SERVER/job/$JOB_NAME/$BUILD_NUMBER/changes > /dev/null 2>&1
    59 
    60         #Process html page and get the list of files that has changed (tricky...)
    61         #cat changes | grep '="The file was modified"' | sed -e 's/.*<\/td><td><a>\(.*\)<\/a><\/td><td>.*/\1/' > $ISSM_DIR/TEMP
    62         #cat changes | grep 'document_edit' |sed -e 's/document_edit.png/document_edit.png\
    63                 #/g' | sed -e 's/.*<\/a><\/td><td>\(.*\)<\/td><\/tr>.*/\1/' | grep -v 'document_edit.png' > $ISSM_DIR/TEMP
    64         cat changes  | tr " " "\n" | grep trunk |  sed -e 's/.*<a>\(.*\)<\/a>.*/\1/' > $ISSM_DIR/TEMP
     57        svn diff -r $SVN_PREVIOUS:$SVN_CURRENT --summarize | awk '{print $NF}' > $ISSM_DIR/changes
    6558
    6659        #Print list of files
    6760        echo "   "
    6861        echo "List of updated files"
    69         cat $ISSM_DIR/TEMP
     62        cat $ISSM_DIR/changes
    7063        echo "   "
    7164
    7265        #Do we need to reinstall externalpackages?
    7366        echo "Determining installation type"
    74         if [ ! -z "$(cat $ISSM_DIR/TEMP | grep externalpackages)" ] ; then
     67        if [ ! -z "$(cat $ISSM_DIR/changes | grep externalpackages)" ] ; then
    7568                echo "  -- checking for changed externalpackages... yes";
    7669                ISSM_EXTERNALPACKAGES="yes"
     
    8174
    8275        #Do we need to reconfigure
    83         if [ ! -z "$(cat $ISSM_DIR/TEMP | grep -e "Makefile.am" -e "m4" )" ] ||
     76        if [ ! -z "$(cat $ISSM_DIR/changes | grep -e "Makefile.am" -e "m4" )" ] ||
    8477                [ ! -f "$ISSM_DIR/bin/issm.exe" ] ||
    8578                [ "$ISSM_EXTERNALPACKAGES" == "yes" ] ;
     
    9386
    9487        #Do we need to recompile
    95         if [ ! -z "$(cat $ISSM_DIR/TEMP | grep -e "\.cpp" -e "\.h" )" ] ||
     88        if [ ! -z "$(cat $ISSM_DIR/changes | grep -e "\.cpp" -e "\.h" )" ] ||
    9689                [ "$ISSM_RECONFIGURE" == "yes" ] ;
    9790        then
     
    10396        fi
    10497        #ISSM_COMPILATION="yes"
     98        rm $ISSM_DIR/changes
    10599
    106100else
Note: See TracChangeset for help on using the changeset viewer.