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

Side by Side Diff: third_party/dom_distiller_js/update_domdistiller_js.sh

Issue 282663002: [Reland] Update DomDistillerJsUpdater and Roll DomDistillerJs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 7
8 # Clones the dom-distiller repo, compiles and extracts its javascript Then 8 # Clones the dom-distiller repo, compiles and extracts its javascript Then
9 # copies that js into the Chromium tree. 9 # copies that js into the Chromium tree.
10 # This script should be run from the src/ directory and requires that ant is 10 # This script should be run from the src/ directory and requires that ant is
11 # installed. 11 # installed.
12 12
13 ( 13 (
14 dom_distiller_js_path=third_party/dom_distiller_js 14 dom_distiller_js_path=third_party/dom_distiller_js
15 compiled_js_path=$dom_distiller_js_path/js/domdistiller.js 15 dom_distiller_js_package=$dom_distiller_js_path/package
16 readme_chromium=$dom_distiller_js_path/README.chromium 16 readme_chromium=$dom_distiller_js_path/README.chromium
17 tmpdir=/tmp/domdistiller-$$ 17 tmpdir=/tmp/domdistiller-$$
18 changes=/tmp/domdistiller.changes 18 changes=/tmp/domdistiller.changes
19 curr_gitsha=$(grep 'Version:' $readme_chromium | awk '{print $2}') 19 curr_gitsha=$(grep 'Version:' $readme_chromium | awk '{print $2}')
20 20
21 rm -rf $tmpdir 21 rm -rf $tmpdir
22 mkdir $tmpdir 22 mkdir $tmpdir
23 23
24 pushd $tmpdir 24 pushd $tmpdir
25 git clone https://code.google.com/p/dom-distiller/ . 25 git clone https://code.google.com/p/dom-distiller/ .
26 ant extractjs
27 new_gitsha=$(git rev-parse --short=10 HEAD) 26 new_gitsha=$(git rev-parse --short=10 HEAD)
28 git log --oneline ${curr_gitsha}.. > $changes 27 git log --oneline ${curr_gitsha}.. > $changes
28 ant package
29 popd 29 popd
30 30
31 mkdir -p $(dirname $compiled_js_path) 31 rm -rf $dom_distiller_js_package
32 cp $tmpdir/out/domdistiller.js $compiled_js_path 32 mkdir $dom_distiller_js_package
33 cp -rf $tmpdir/out/package/* $dom_distiller_js_package
33 cp $tmpdir/LICENSE $dom_distiller_js_path/ 34 cp $tmpdir/LICENSE $dom_distiller_js_path/
34 sed -i "s/Version: [0-9a-f]*/Version: $new_gitsha/" $readme_chromium 35 sed -i "s/Version: [0-9a-f]*/Version: $new_gitsha/" $readme_chromium
35 36
36 echo "Picked up changes:" 37 echo "Picked up changes:"
37 cat $changes 38 cat $changes
38 39
40 # Run checklicenses.py on the pulled files, but only print the output on
41 # failures.
42 tools/checklicenses/checklicenses.py $dom_distiller_js_path > $tmpdir/checklic enses.out || cat $tmpdir/checklicenses.out
43
39 rm -rf $tmpdir 44 rm -rf $tmpdir
40 rm $changes 45 rm $changes
41 ) 46 )
OLDNEW
« 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