Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1342)

Unified Diff: third_party/dom_distiller_js/update_domdistiller_js.sh

Issue 297563002: Roll DomDistillerJs (and make updater generate BUG=) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
)
« no previous file with comments | « third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698