diff options
author | Paul Duffin <paulduffin@google.com> | 2021-04-07 10:41:24 +0100 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2021-04-07 22:17:36 +0100 |
commit | f998f8b4273886b9c55c83d899fb8a28407b4144 (patch) | |
tree | c99e5a1880bdb416a04b60847dad26275b59e468 /tools/hiddenapi | |
parent | dea9900796d5dece1d72e3742462ac9241f03d68 (diff) |
Update hiddenapi preupload checks to handle new location
The config/hiddenapi-*.txt files have moved so this change updates the
preupload scripts to match their new location.
Test: Modify the boot/hiddenapi/hiddenapi-*.txt files in various ways
to verify the scripts fail.
Change-Id: I725458e809d9871b2c21bc4e18f62441aaa775a9
Diffstat (limited to 'tools/hiddenapi')
-rwxr-xr-x | tools/hiddenapi/checksorted_sha.sh | 2 | ||||
-rwxr-xr-x | tools/hiddenapi/exclude.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/hiddenapi/checksorted_sha.sh b/tools/hiddenapi/checksorted_sha.sh index ceb705f4e42a..451fed6be353 100755 --- a/tools/hiddenapi/checksorted_sha.sh +++ b/tools/hiddenapi/checksorted_sha.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e LOCAL_DIR="$( dirname ${BASH_SOURCE} )" -git show --name-only --pretty=format: $1 | grep "config/hiddenapi-.*txt" | while read file; do +git show --name-only --pretty=format: $1 | grep "boot/hiddenapi/hiddenapi-.*txt" | while read file; do diff <(git show $1:$file) <(git show $1:$file | $LOCAL_DIR/sort_api.sh ) || { echo -e "\e[1m\e[31m$file $1 is not sorted or contains duplicates. To sort it correctly:\e[0m" echo -e "\e[33m${LOCAL_DIR}/sort_api.sh $2/frameworks/base/$file\e[0m" diff --git a/tools/hiddenapi/exclude.sh b/tools/hiddenapi/exclude.sh index 2924e0109830..822aba4ee43b 100755 --- a/tools/hiddenapi/exclude.sh +++ b/tools/hiddenapi/exclude.sh @@ -48,7 +48,7 @@ SHA=$1 PACKAGES=$(for t in $TEAMS; do echo $(eval echo \${${t}_PACKAGES}); done) RE=$(echo ${PACKAGES} | sed "s/ /|/g") EXIT_CODE=0 -for file in $(git show --name-only --pretty=format: $SHA | grep "config/hiddenapi-.*txt"); do +for file in $(git show --name-only --pretty=format: $SHA | grep "boot/hiddenapi/hiddenapi-.*txt"); do ENTRIES=$(grep -E "^\+L(${RE})/" <(git diff ${SHA}~1 ${SHA} $file) | sed "s|^\+||" || echo) if [[ -n "${ENTRIES}" ]]; then echo -e "\e[1m\e[31m$file $SHA contains the following entries\e[0m" |