| Index: third_party/dom_distiller_js/update_domdistiller_js.sh
|
| diff --git a/third_party/dom_distiller_js/update_domdistiller_js.sh b/third_party/dom_distiller_js/update_domdistiller_js.sh
|
| index 0c6ca37884a9eee6cb7861f119eac1038989227f..97f06ef023b69c894ea5cf5dcac74c1b1171c86e 100755
|
| --- a/third_party/dom_distiller_js/update_domdistiller_js.sh
|
| +++ b/third_party/dom_distiller_js/update_domdistiller_js.sh
|
| @@ -15,7 +15,8 @@
|
| dom_distiller_js_package=$dom_distiller_js_path/package
|
| readme_chromium=$dom_distiller_js_path/README.chromium
|
| tmpdir=/tmp/domdistiller-$$
|
| - changes=/tmp/domdistiller.changes
|
| + changes=$tmpdir/domdistiller.changes
|
| + bugs=$tmpdir/domdistiller.bugs
|
| curr_gitsha=$(grep 'Version:' $readme_chromium | awk '{print $2}')
|
|
|
| rm -rf $tmpdir
|
| @@ -23,8 +24,27 @@
|
|
|
| pushd $tmpdir
|
| git clone https://code.google.com/p/dom-distiller/ .
|
| +
|
| new_gitsha=$(git rev-parse --short=10 HEAD)
|
| git log --oneline ${curr_gitsha}.. > $changes
|
| +
|
| + echo -n BUG= > $bugs
|
| +
|
| + # This extracts BUG= lines from the log, extracts the numbers part, removes
|
| + # whitespace and deletes empty lines. Then, split on ',', sort, uniquify and
|
| + # rejoin. Finally, remove the trailing ',' and concat to $bugs.
|
| + git log \
|
| + | grep BUG= \
|
| + | sed -e 's/.*BUG=\(.*\)/\1/' -e 's/\s*//g' -e '/^$/d' \
|
| + | tr ',' '\n' \
|
| + | sort \
|
| + | uniq \
|
| + | tr '\n' ',' \
|
| + | head --bytes=-1 \
|
| + >> $bugs
|
| +
|
| + echo >> $bugs # add a newline
|
| +
|
| ant package
|
| popd
|
|
|
| @@ -34,13 +54,18 @@
|
| cp $tmpdir/LICENSE $dom_distiller_js_path/
|
| sed -i "s/Version: [0-9a-f]*/Version: $new_gitsha/" $readme_chromium
|
|
|
| + echo
|
| + echo
|
| + echo "---Generated commit message---"
|
| + echo
|
| echo "Picked up changes:"
|
| cat $changes
|
| + echo
|
| + cat $bugs
|
|
|
| # Run checklicenses.py on the pulled files, but only print the output on
|
| # failures.
|
| tools/checklicenses/checklicenses.py $dom_distiller_js_path > $tmpdir/checklicenses.out || cat $tmpdir/checklicenses.out
|
|
|
| rm -rf $tmpdir
|
| - rm $changes
|
| )
|
|
|