aboutsummaryrefslogtreecommitdiff
path: root/android_merge_from_upstream.sh
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2022-01-05 21:47:21 -0800
committerStephen Hines <srhines@google.com>2022-01-05 21:47:21 -0800
commit7bc245bad95c6f4c15bc3f819f61312705b59a5a (patch)
treecf4cdad04e1c146844e2a790910cf9cd1b97082a /android_merge_from_upstream.sh
parentf103b9f78baa21b4edf25d5dd5a1226b6c0ff159 (diff)
parentdbc8cb672a14f4a8bb136074817c71a22f743eaf (diff)
downloadtoolchain-utils-7bc245bad95c6f4c15bc3f819f61312705b59a5a.tar.gz
Merged commit digest: dbc8cb67 compiler_wrapper: Use ld.bfd to detect binutils path 0274702f patch_sync: Add show subcommand 7fd98520 patch_sync: Add patch_parsing module 72bb9a35 patch_sync: Base code, version control managing 457d96b5 pgo_tools: make monitor_pgo_profiles fail rather than emailing ed486b7b afdo_metadata: Publish the new kernel profiles a170d3e2 crosperf: remove dead bob DUT d60f468c afdo_metadata: Publish the new kernel profiles 26b91865 llvm_tools: Update get_upstream_patch schema 811429e3 llvm_tools: Catch dup SHAs in get_upstream_patch ed2aa295 compiler_wrapper: Drop "-fno-experimental-pass-manager" e8d03f7e rust_watch: report bugs for new minor or major versions of rustc 443e0b36 cros_utils: Add a bug reporting module 86fe58c1 compiler_wrapper: adds ${sysroot}/usr/lib to linker path d02a62da compiler_wrapper: add missing unused-but-set-var 50d42705 afdo_metadata: Publish the new kernel profiles 7afc3522 llvm_tools: Make skip_dependencies optional 9de6ecbf crosperf: Increase timeout for a crosfleet call 58a779e7 llvm_tools: adds a way to skip dependencies when pulling from Phab 28d6cbe1 crosperf: Replace non-inclusive language c965dab6 afdo_metadata: Publish the new kernel profiles 58bc0488 crosperf: Update default_remotes to new DUTs 70c83ac3 Replace non-inclusive language d080198a llvm_tools: fix yapf warnings 5200728b llvm_tools: Add lldb_server to updated_packages afd2d4b0 compiler_wrapper: ignore unused_but_set_variable 217c68a1 Add crosperf_autolock.py wrapper dcb168bf afdo_metadata: Publish the new kernel profiles a7a19342 Auto-format the crosperf files c5e12fba Add 'no_lock' crosperf setting ec4d2aec afdo_metadata: Publish the new kernel profiles 2c5d6278 compiler_wrapper: move llvmnext flag to post flags Change-Id: Id8af179e775f6fe23c22ce05b8be9b5b02ccbaf4
Diffstat (limited to 'android_merge_from_upstream.sh')
-rwxr-xr-xandroid_merge_from_upstream.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/android_merge_from_upstream.sh b/android_merge_from_upstream.sh
index 65b47d7b..4716a25a 100755
--- a/android_merge_from_upstream.sh
+++ b/android_merge_from_upstream.sh
@@ -11,9 +11,9 @@
# https://android-review.googlesource.com/c/platform/external/toolchain-utils/+/1132504/1
local_branch_name="merge_with_upstream"
-local_upstream="aosp/master"
+local_upstream="aosp/master" # nocheck
remote="aosp"
-remote_branch="${remote}/upstream-main"
+remote_branch="${remote}/upstream-main" # nocheck
my_dir="$(dirname "$(readlink -m "$0")")"
cd "${my_dir}"
@@ -21,7 +21,7 @@ cd "${my_dir}"
ensure_head_is_upstream_main() {
local current_rev main_rev
current_rev="$(git rev-parse HEAD)"
- main_rev="$(git rev-parse ${local_upstream})"
+ main_rev="$(git rev-parse "${local_upstream}")"
if [[ "${current_rev}" != "${main_rev}" ]]; then
echo "Please checkout ${local_upstream} and rerun this" >&2
exit
@@ -49,7 +49,7 @@ ensure_no_local_branch_present() {
get_merge_commit_list() {
local merge_base
- merge_base="$(git merge-base HEAD ${remote_branch})"
+ merge_base="$(git merge-base HEAD "${remote_branch}")"
git log --oneline "${merge_base}..${remote_branch}"
}
@@ -62,6 +62,9 @@ repo start "${local_branch_name}"
commit_list="$(get_merge_commit_list)"
num_commits="$(wc -l <<< "${commit_list}")"
+
+# Disable shellcheck for the sed substitution warning.
+# shellcheck disable=SC2001
commit_message="Merging ${num_commits} commit(s) from Chromium's toolchain-utils
Merged commit digest:
@@ -69,6 +72,6 @@ $(sed 's/^/ /' <<< "${commit_list}")
"
git merge "${remote_branch}" -m "${commit_message}"
-echo 'NOTE: When you try to `repo upload`, repo might show a scary warning'
+echo 'NOTE: When you try to "repo upload", repo might show a scary warning'
echo 'about the number of changes are being uploaded. That should be fine,'
echo 'since repo will only create CLs for commits not known to our remote.'