aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadaf Ebrahimi <sadafebrahimi@google.com>2023-04-20 16:07:32 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-04-20 16:07:32 +0000
commit2d773c325977df36896c07ed934c9b8cc9f25184 (patch)
tree2658c88ceba55e2bf3818398f7c54ff054ac25cb
parentfcf9aa9c6eceff96326f3745e866b901757e04f2 (diff)
parentd56b397cf36fc66a0ad9db0d5502887c0de76491 (diff)
downloadexternal_updater-2d773c325977df36896c07ed934c9b8cc9f25184.tar.gz
Rename parser arguments to fit command line convention am: 904aac2b3e am: d56b397cf3
Original change: https://android-review.googlesource.com/c/platform/tools/external_updater/+/2548554 Change-Id: I9c5020e16543b1c00e9efe9b4a5fc67446dab593 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--README.md8
-rw-r--r--external_updater.py20
2 files changed, 14 insertions, 14 deletions
diff --git a/README.md b/README.md
index a6bf28f..d5e251e 100644
--- a/README.md
+++ b/README.md
@@ -16,22 +16,22 @@ Update a library, commit, and upload the change to Gerrit:
tools/external_updater/updater.sh update ${LIBNAME}
```
-Update a library without committing and uploading:
+Update a library without committing and uploading to Gerrit:
```shell
-tools/external_updater/updater.sh update --stop_after_merge ${LIBNAME}
+tools/external_updater/updater.sh update --no-upload ${LIBNAME}
```
Update a library on top of the local changes in the current branch, commit, and upload the change to Gerrit:
```shell
-tools/external_updater/updater.sh update --keep_local_changes ${LIBNAME}
+tools/external_updater/updater.sh update --keep-local-changes ${LIBNAME}
```
Update a library without building:
```shell
-tools/external_updater/updater.sh update --no_build ${LIBNAME}
+tools/external_updater/updater.sh update --no-build ${LIBNAME}
```
LIBNAME can be the path to a library under external/, e.g. kotlinc, or
diff --git a/external_updater.py b/external_updater.py
index fe03390..149eea9 100644
--- a/external_updater.py
+++ b/external_updater.py
@@ -121,7 +121,7 @@ def _do_update(args: argparse.Namespace, updater: Updater,
print("Build failed. Aborting upload.")
return
- if args.stop_after_merge:
+ if args.no_upload:
return
try:
@@ -272,7 +272,7 @@ def parse_args() -> argparse.Namespace:
nargs='*',
help='Paths of the project. '
'Relative paths will be resolved from external/.')
- check_parser.add_argument('--json_output',
+ check_parser.add_argument('--json-output',
help='Path of a json file to write result to.')
check_parser.add_argument(
'--all',
@@ -292,7 +292,7 @@ def parse_args() -> argparse.Namespace:
nargs='*',
help='Paths of the project as globs. '
'Relative paths will be resolved from external/.')
- update_parser.add_argument('--json_output',
+ update_parser.add_argument('--json-output',
help='Path of a json file to write result to.')
update_parser.add_argument(
'--force',
@@ -303,23 +303,23 @@ def parse_args() -> argparse.Namespace:
help='Run update and refresh to the current version.',
action='store_true')
update_parser.add_argument(
- '--keep_date',
+ '--keep-date',
help='Run update and do not change date in METADATA.',
action='store_true')
- update_parser.add_argument('--stop_after_merge',
+ update_parser.add_argument('--no-upload',
action='store_true',
- help='Stops after merging new changes')
- update_parser.add_argument('--keep_local_changes',
+ help='Does not upload to Gerrit after upgrade')
+ update_parser.add_argument('--keep-local-changes',
action='store_true',
help='Updates the current branch')
- update_parser.add_argument('--skip_post_update',
+ update_parser.add_argument('--skip-post-update',
action='store_true',
help='Skip post_update script')
- update_parser.add_argument('--no_build',
+ update_parser.add_argument('--no-build',
action='store_false',
dest='build',
help='Skip building'),
- update_parser.add_argument('--remote_name',
+ update_parser.add_argument('--remote-name',
default='aosp',
required=False,
help='Upstream remote name.')