Skip to content

Commit

Permalink
Update dom-distiller script for new dist repo
Browse files Browse the repository at this point in the history
Dom-distiller is moving to use gerrit and the dist-roll script
references need to be updated. The github repos still exist and
are mirrored versions of ones hosted by google.

BUG=749769

Change-Id: I99404c9097bb22f3cca5f233d2d1e8fb658d9375
Reviewed-on: https://chromium-review.googlesource.com/687991
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505149}
  • Loading branch information
iotitan authored and Commit Bot committed Sep 28, 2017
1 parent 14aba01 commit 6673697
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions third_party/dom_distiller_js/update_domdistiller_js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
changes=$tmpdir/domdistiller.changes
bugs=$tmpdir/domdistiller.bugs
curr_gitsha=$(grep 'Version:' $readme_chromium | awk '{print $2}')
repo_host=https://chromium.googlesource.com/chromium

rm -rf $tmpdir
mkdir $tmpdir
pushd $tmpdir

git clone https://github.com/chromium/dom-distiller.git
git clone $repo_host/dom-distiller
pushd dom-distiller

# The new git SHA1 is HEAD or the first command line parameter.
Expand Down Expand Up @@ -55,7 +56,7 @@
ant package
popd # dom-distiller

git clone https://github.com/chromium/dom-distiller-dist.git $tmpdir/dom-distiller-dist
git clone $repo_host/dom-distiller/dist $tmpdir/dom-distiller-dist
rm -rf $tmpdir/dom-distiller-dist/*
pushd dom-distiller-dist
cp -r $tmpdir/dom-distiller/out/package/* .
Expand All @@ -71,7 +72,7 @@
popd # dom-distiller-dist

popd # tmpdir
curr_dist_gitsha=$(grep -e "/external\/github.com\/chromium\/dom-distiller-dist.git" $src_path/DEPS | sed -e "s/.*'\([A-Za-z0-9]\{40\}\)'.*/\1/g")
curr_dist_gitsha=$(grep -e "/chromium\/dom-distiller\/dist.git" $src_path/DEPS | sed -e "s/.*'\([A-Za-z0-9]\{40\}\)'.*/\1/g")
if [[ "${new_dist_gitsha}" == "${curr_dist_gitsha}" ]]; then
echo "The roll does not include any changes to the dist package. Exiting."
rm -rf $tmpdir
Expand All @@ -80,7 +81,7 @@

cp $tmpdir/dom-distiller/LICENSE $dom_distiller_js_path/
sed -i "s/Version: [0-9a-f]*/Version: ${new_gitsha}/" $readme_chromium
sed -i -e "s/\('\/external\/github.com\/chromium\/dom-distiller-dist.git' + '@' + '\)\([0-9a-f]\+\)'/\1${new_dist_gitsha}'/" $src_path/DEPS
sed -i -e "s/\('\/chromium\/dom-distiller\/dist.git' + '@' + '\)\([0-9a-f]\+\)'/\1${new_dist_gitsha}'/" $src_path/DEPS

gen_message () {
echo "Roll DOM Distiller JavaScript distribution package"
Expand Down

0 comments on commit 6673697

Please sign in to comment.