Commit 641efff1 authored by vitalyp's avatar vitalyp Committed by Commit bot

Add script to update Closure Compiler version and chrome_extensions.js

R=dbeam@chromium.org
BUG=393873
TEST=./third_party/closure_compiler/bump_compiler_version

Review URL: https://codereview.chromium.org/582193002

Cr-Commit-Position: refs/heads/master@{#295643}
parent a9bf5603
......@@ -23,3 +23,6 @@ Local modifications:
{cr|Object}.defineProperty() and public API generation with cr.makePublic().
See third_party/closure_compiler/runner/how_to_test_compiler_pass.md for
testing instructions on this pass.
- Use the script third_party/closure_compiler/bump_compiler_version to update
the versions of third_party/closure_compiler/compiler/compiler.jar and
third_party/closure_compiler/externs/chrome_extensions.js.
#!/bin/bash
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Download the newest version of Closure Compiler, build it and put into Chrome
# source tree. Also update externs/chrome_extensions.js.
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly TEMP_DIR=$(mktemp -d)
cleanup() {
rm -rf "${TEMP_DIR}"
}
trap cleanup SIGINT SIGHUP SIGTERM
cd "${TEMP_DIR}"
echo "Cloning Closure Compiler repo"
git clone https://github.com/google/closure-compiler.git
cd closure-compiler
echo "Building Closure Compiler"
ant jar
if [[ "$?" -ne 0 ]]; then
echo "Failed to build jar, copying nothing" >&2
cleanup
exit 1
fi
echo "Copying compiler.jar and chrome_extensions.js"
cp build/compiler.jar "${SCRIPT_DIR}/compiler/"
cp contrib/externs/chrome_extensions.js "${SCRIPT_DIR}/externs/"
echo "Done"
cleanup
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment