Skip to content

Commit

Permalink
Revert cmdline-tools upgrade to implement separately
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed Aug 1, 2023
1 parent 2ef9191 commit a7abd96
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/briefcase/integrations/android_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def cmdline_tools_path(self) -> Path:
@property
def cmdline_tools_version(self) -> str:
# This is the version of the Android SDK Command-line tools that
# are current as of July 2023. These tools can generally self-update,
# are current as of May 2022. These tools can generally self-update,
# so using a fixed download URL isn't a problem.
# However, if/when this version number is changed, ensure that the
# checks done during verification include any required upgrade steps.
return "9477386"
return "8092744"

@property
def cmdline_tools_version_path(self) -> Path:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_cmdline_tools_url(mock_tools, android_sdk, host_os, host_arch, name):
mock_tools.host_arch = host_arch

assert android_sdk.cmdline_tools_url == (
f"https://dl.google.com/android/repository/commandlinetools-{name}-9477386_latest.zip"
f"https://dl.google.com/android/repository/commandlinetools-{name}-8092744_latest.zip"
)


Expand Down
12 changes: 6 additions & 6 deletions tests/integrations/android_sdk/AndroidSDK/test_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def test_download_sdk(mock_tools, tmp_path):
# Validate that the SDK was downloaded and unpacked
url = (
"https://dl.google.com/android/repository/"
f"commandlinetools-{mock_tools._test_download_tag}-9477386_latest.zip"
f"commandlinetools-{mock_tools._test_download_tag}-8092744_latest.zip"
)
mock_tools.download.file.assert_called_once_with(
url=url,
Expand Down Expand Up @@ -495,7 +495,7 @@ def test_download_sdk_legacy_install(mock_tools, tmp_path):
# Validate that the SDK was downloaded and unpacked
url = (
"https://dl.google.com/android/repository/"
f"commandlinetools-{mock_tools._test_download_tag}-9477386_latest.zip"
f"commandlinetools-{mock_tools._test_download_tag}-8092744_latest.zip"
)
mock_tools.download.file.assert_called_once_with(
url=url,
Expand Down Expand Up @@ -554,7 +554,7 @@ def test_download_sdk_if_sdkmanager_not_executable(mock_tools, tmp_path):
# Create pre-existing non-executable `sdkmanager`.
(cmdline_tools_base_path / "latest" / "bin").mkdir(parents=True)
(cmdline_tools_base_path / "latest" / "bin" / "sdkmanager").touch(mode=0o644)
(cmdline_tools_base_path / "9477386").touch()
(cmdline_tools_base_path / "8092744").touch()

# The download will produce a cached file
cache_file = MagicMock()
Expand All @@ -572,7 +572,7 @@ def test_download_sdk_if_sdkmanager_not_executable(mock_tools, tmp_path):
# Validate that the SDK was downloaded and unpacked
url = (
"https://dl.google.com/android/repository/"
f"commandlinetools-{mock_tools._test_download_tag}-9477386_latest.zip"
f"commandlinetools-{mock_tools._test_download_tag}-8092744_latest.zip"
)
mock_tools.download.file.assert_called_once_with(
url=url,
Expand Down Expand Up @@ -605,7 +605,7 @@ def test_raises_networkfailure_on_connectionerror(mock_tools):
# The download was attempted
url = (
"https://dl.google.com/android/repository/"
f"commandlinetools-{mock_tools._test_download_tag}-9477386_latest.zip"
f"commandlinetools-{mock_tools._test_download_tag}-8092744_latest.zip"
)
mock_tools.download.file.assert_called_once_with(
url=url,
Expand All @@ -632,7 +632,7 @@ def test_detects_bad_zipfile(mock_tools, tmp_path):
# The download attempt was made.
url = (
"https://dl.google.com/android/repository/"
f"commandlinetools-{mock_tools._test_download_tag}-9477386_latest.zip"
f"commandlinetools-{mock_tools._test_download_tag}-8092744_latest.zip"
)
mock_tools.download.file.assert_called_once_with(
url=url,
Expand Down

0 comments on commit a7abd96

Please sign in to comment.