Changeset 31961 for other-projects


Ignore:
Timestamp:
2017-09-11T17:24:43+12:00 (7 years ago)
Author:
ak19
Message:

Adding support in our automated daily GTI status emails for reporting translation files that are in SVN conflict. This is experiimental (untested) since nothing is presently in conflict. The need for the change became apparent when one translator-modified translation file was in conflict since late August and we weren't informed that it had been modified in our daily GTI status emails, since the script used to only report SVN modified and newly added files, not those whose svn status was marked as in conflict.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/gti/translation_status.sh

    r31715 r31961  
    3131num_modified=0
    3232num_added=0
     33num_conflict=0
    3334
    3435# in the lines returned from the diff, test for archives or newline
     
    8081echo "---------------------------------------------" >> $report
    8182
     83
     84# repeat again, this time looking for any files in conflict
     85for file in ${filelisting[@]}; do
     86    status=`svn status $file`
     87    if [[ "$status" == *"C "* ]]; then
     88        #echo "$file is in conflict: $status"                                                                                                                                                           
     89        echo $status >> $report
     90        ((num_conflict++))
     91    fi
     92done
     93
     94if [[ $num_conflict == 0 ]]; then
     95    echo "No files in conflict" >> $report
     96    echo "---------------------------------------------" >> $report
     97else
     98    echo "" >> $report
     99    echo "The above $num_conflict files were IN CONFLICT." >> $report
     100    echo "---------------------------------------------" >> $report
     101fi
     102
     103
     104
     105
    82106# restore IFS
    83107IFS=$IFS_BAK
     
    89113if [[ $num_modified != 0 || $num_added != 0 ]]; then
    90114#  echo "Files were modified or added. Sending email..." 
    91     cat $report | mail -s 'GTI: '$num_modified/$num_added' language file(s) on gti (nzdl) have been updated/added' $GREENSTONE_EMAIL
     115    cat $report | mail -s 'GTI: '$num_modified/$num_added/$num_conflict' language file(s) on gti (nzdl) have been updated/added or conflict' $GREENSTONE_EMAIL
     116    echo "Sent mail of report: $report"
     117elif [[ $num_conflict != 0 ]]; then
     118#  echo "Files were modified or added. Sending email..." 
     119    cat $report | mail -s 'GTI: '$num_conflict' language file(s) on gti (nzdl) are IN CONFLICT' $GREENSTONE_EMAIL
    92120    echo "Sent mail of report: $report"
    93121else
Note: See TracChangeset for help on using the changeset viewer.