Devin Moore | 3511c73 | 2023-02-22 00:37:12 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Create a CL that contains the changes between this branch and a newer branch |
| 4 | # for a given AIDL interface. |
| 5 | # Be sure that BRANCH_BASE is the current upstream branch in order to get a CL. |
| 6 | |
| 7 | if [[ $# -ne 3 ]]; then |
| 8 | echo "Usage: $0 BRANCH_BASE BRANCH_NEW PACKAGE_NAME" |
| 9 | echo "- BRANCH_BASE current branch, typically a previous release's dev branch" |
| 10 | echo "- BRANCH_NEW end branch, typically goog/master as the latest branch" |
| 11 | echo "- PACKAGE_NAME this is the AIDL package name" |
| 12 | echo "example of creating the diffs for android.hardware.boot" |
| 13 | echo "$ git checkout tm-dev ; repo start review" |
| 14 | echo "$ ./anapic_release_diff.sh goog/tm-dev goog/master android.hardware.boot" |
| 15 | exit 1 |
| 16 | fi |
| 17 | |
| 18 | # for pathmod |
| 19 | source ${ANDROID_BUILD_TOP}/build/make/envsetup.sh |
| 20 | |
| 21 | set -ex |
| 22 | |
| 23 | INTERFACE_NAME_NO_VER=${3%@*} |
| 24 | pushd $(pathmod $INTERFACE_NAME_NO_VER) |
| 25 | git diff "$1".."$2" android | git apply |
| 26 | git add -A |
| 27 | git commit -am "Android $1 to $2: $3" --no-edit |
| 28 | git diff HEAD~1 --stat |
Devin Moore | fc9a722 | 2023-02-22 01:01:52 +0000 | [diff] [blame] | 29 | repo upload . --no-verify --wip --hashtag=anapic_release_review |
Devin Moore | 3511c73 | 2023-02-22 00:37:12 +0000 | [diff] [blame] | 30 | popd |