Skip to content

Commit

Permalink
build_slider.sh: Detect if git knows about aosp/android12-5.10
Browse files Browse the repository at this point in the history
If the user hasn't fetched aosp/android12-5.10, then checking the
merge-base against that branch will fail since it doesn't know about it.
So make sure to check if we got a sha1 before comparing to the repo
aosp/ revision.

Fixes: ceb9558 ("build_slider: Throw a warning when trying to build AOSP ToT")
Signed-off-by: Will McVicker <[email protected]>
Change-Id: I549d3184be9048116331ef78aea3d15e88d53c03
  • Loading branch information
Will McVicker authored and TreeHugger Robot committed May 4, 2021
1 parent 2e19a0f commit 82495bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build_slider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if [ "${EXPERIMENTAL_BUILD}" = "0" -a "${BUILD_KERNEL}" != "0" ]; then
# Booting AOSP ToT does not always work; throw a warning to prevent this.
REPO_SHA=$(git log -1 --pretty="format:%H" m/s-dev-gs-pixel-5.10)
LOCAL_MERGE_BASE=$(git merge-base HEAD aosp/android12-5.10)
if [ "${REPO_SHA}" != "${LOCAL_MERGE_BASE}" ]; then
if [ -n "${LOCAL_MERGE_BASE}" -a "${REPO_SHA}" != "${LOCAL_MERGE_BASE}" ]; then
echo "Your aosp/ directory appears to be synced to a point beyond the"
echo " latest AOSP merge point. This is not supported, currently, as"
echo " it is prone to errors. Please base any changes on"
Expand Down

0 comments on commit 82495bf

Please sign in to comment.