From d56aa7f9115f6104d0c3224ca0c365a5bd372b98 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Mon, 14 Jan 2019 00:42:27 -0500 Subject: [PATCH] Add source import tool --- CHROMIUM_VERSION | 1 + tools/import-upstream.sh | 24 +++++++++++++++++++ tools/include.txt | 52 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 CHROMIUM_VERSION create mode 100755 tools/import-upstream.sh create mode 100644 tools/include.txt diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION new file mode 100644 index 0000000000..3159c4439b --- /dev/null +++ b/CHROMIUM_VERSION @@ -0,0 +1 @@ +71.0.3578.98 diff --git a/tools/import-upstream.sh b/tools/import-upstream.sh new file mode 100755 index 0000000000..6798d0336e --- /dev/null +++ b/tools/import-upstream.sh @@ -0,0 +1,24 @@ +#!/bin/sh +set -ex +have_version=$(cut -d= -f2 src/chrome/VERSION | tr '\n' . | cut -d. -f1-4) +want_version=$(cat CHROMIUM_VERSION) +if [ "$have_version" = "$want_version" ]; then + exit 0 +fi +name="chromium-$want_version" +tarball="$name.tar.xz" +url="https://commondatastorage.googleapis.com/chromium-browser-official/$tarball" +root=$(git rev-list --max-parents=0 HEAD) +git config core.autocrlf false +git config core.safecrlf false +git -c advice.detachedHead=false checkout $root +rm -rf src +git checkout master -- tools +sed -i "s/^\^/$name\//" tools/include.txt +curl "$url" -o- | tar xJf - --wildcards --wildcards-match-slash -T tools/include.txt +mv "$name" src +find src -name .gitignore -delete +git rm --quiet --force -r tools +git add src +git commit --quiet --amend -m "Import $name" --date=now +git rebase --onto HEAD HEAD master diff --git a/tools/include.txt b/tools/include.txt new file mode 100644 index 0000000000..ce05a9768a --- /dev/null +++ b/tools/include.txt @@ -0,0 +1,52 @@ +*/BUILD.gn +*.gni +*.gyp +*.gypi +*.mojom +*.typemap +^AUTHORS +^LICENSE +^.clang-format +^.gitattributes +^.gn +^base +^build +^buildtools/third_party/libc++/trunk/include +^buildtools/third_party/libc++/trunk/src +^buildtools/third_party/libc++abi/trunk/include +^buildtools/third_party/libc++abi/trunk/src +^chrome/VERSION +^chrome/android/profiles/newest.txt +^chrome/app/theme/chromium/BRANDING +^chrome/test/chromedriver/*.pydeps +^components/version_info +^crypto +^google_apis/build/check_internal.py +^ipc/ipc_param_traits.h +^native_client/build/get_toolchain_revision.py +^native_client/toolchain_revisions +^net +^remoting/VERSION +^remoting/branding_Chromium +^remoting/host/win/get_clsids.py +^remoting/tools/remove_spaces.py +^testing/gtest/include/gtest/gtest_prod.h +^third_party/angle/src/commit_id.py +^third_party/apple_apsl +^third_party/boringssl +^third_party/depot_tools/cpplint.py +^third_party/googletest/src/googletest/include/gtest/gtest_prod.h +^third_party/modp_b64 +^third_party/protobuf/mirclient* +^third_party/protobuf/src +^third_party/tcmalloc/gperftools-2.0/chromium +^third_party/win_build_output +^third_party/yasm +^third_party/zlib +^tools/binary_size/supersize.pydeps +^tools/cfi +^tools/clang/scripts/update.py +^tools/grit +^tools/gritsettings +^tools/protoc_wrapper +^url