Skip to content

Commit f46e4e4

Browse files
update arg description
1 parent d7ea0df commit f46e4e4

5 files changed

Lines changed: 12 additions & 16 deletions

File tree

docs/app-store-connect/get-latest-app-store-build-number.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Explicitly show version string in command output in addition to build number
4646
##### `--all-versions`
4747

4848

49-
Search across all versions and return the highest build number found, instead of returning the build of the highest version. Useful for hot-fix flows where a lower marketing version may carry a higher build number. Mutually exclusive with `--version-string` and `--pre-release-version`.
49+
Return the highest build number across all versions, instead of the build of the highest version. Useful for hot-fix flows where a lower marketing version may carry a higher build number. Slower for apps with many versions. Mutually exclusive with `--version-string` and `--pre-release-version`.
5050
### Optional arguments for command `app-store-connect`
5151

5252
##### `--log-api-calls`

docs/app-store-connect/get-latest-build-number.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Explicitly show version string in command output in addition to build number
4646
##### `--all-versions`
4747

4848

49-
Search across all versions and return the highest build number found, instead of returning the build of the highest version. Useful for hot-fix flows where a lower marketing version may carry a higher build number. Mutually exclusive with `--version-string` and `--pre-release-version`.
49+
Return the highest build number across all versions, instead of the build of the highest version. Useful for hot-fix flows where a lower marketing version may carry a higher build number. Slower for apps with many versions. Mutually exclusive with `--version-string` and `--pre-release-version`.
5050
### Optional arguments for command `app-store-connect`
5151

5252
##### `--log-api-calls`

docs/app-store-connect/get-latest-testflight-build-number.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Explicitly show version string in command output in addition to build number
5656
##### `--all-versions`
5757

5858

59-
Search across all versions and return the highest build number found, instead of returning the build of the highest version. Useful for hot-fix flows where a lower marketing version may carry a higher build number. Mutually exclusive with `--version-string` and `--pre-release-version`.
59+
Return the highest build number across all versions, instead of the build of the highest version. Useful for hot-fix flows where a lower marketing version may carry a higher build number. Slower for apps with many versions. Mutually exclusive with `--version-string` and `--pre-release-version`.
6060
### Optional arguments for command `app-store-connect`
6161

6262
##### `--log-api-calls`

src/codemagic/tools/app_store_connect/actions/latest_build_number_actions.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,9 @@ def __get_testflight_latest_build_info(
151151
if not all_versions:
152152
return candidate
153153
candidates.append(candidate)
154-
return max(
155-
candidates,
156-
key=lambda info: versions.sorting_key(cast(_LatestBuildInfo, info).build_number),
157-
default=None,
158-
)
154+
if not candidates:
155+
return None
156+
return max(candidates, key=lambda info: versions.sorting_key(info.build_number))
159157

160158
def __get_app_store_latest_build_info(
161159
self,
@@ -178,11 +176,9 @@ def __get_app_store_latest_build_info(
178176
if not all_versions:
179177
return candidate
180178
candidates.append(candidate)
181-
return max(
182-
candidates,
183-
key=lambda info: versions.sorting_key(cast(_LatestBuildInfo, info).build_number),
184-
default=None,
185-
)
179+
if not candidates:
180+
return None
181+
return max(candidates, key=lambda info: versions.sorting_key(info.build_number))
186182

187183
def _get_testflight_latest_build_info(
188184
self,

src/codemagic/tools/app_store_connect/arguments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,9 +1302,9 @@ class BuildNumberArgument(cli.Argument):
13021302
flags=("--all-versions",),
13031303
type=bool,
13041304
description=(
1305-
"Search across all versions and return the highest build number found, "
1306-
"instead of returning the build of the highest version. Useful for hot-fix flows "
1307-
"where a lower marketing version may carry a higher build number. "
1305+
"Return the highest build number across all versions, instead of the build "
1306+
"of the highest version. Useful for hot-fix flows where a lower marketing "
1307+
"version may carry a higher build number. Slower for apps with many versions. "
13081308
f"Mutually exclusive with `{Colors.BRIGHT_BLUE('--version-string')}` and "
13091309
f"`{Colors.BRIGHT_BLUE('--pre-release-version')}`."
13101310
),

0 commit comments

Comments
 (0)