aboutsummaryrefslogtreecommitdiff
path: root/tool/aio.py
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-11-23 20:40:34 +0800
committercrupest <crupest@outlook.com>2022-11-23 20:40:34 +0800
commitea89f67879ac335d98b3bf31c06cb78c53b581a0 (patch)
treedd4438376c8c96df4355a96bd3860795c2db5566 /tool/aio.py
parent324bcb621ad29f22041eed970ae4eee965d61592 (diff)
downloadcrupest-ea89f67879ac335d98b3bf31c06cb78c53b581a0.tar.gz
crupest-ea89f67879ac335d98b3bf31c06cb78c53b581a0.tar.bz2
crupest-ea89f67879ac335d98b3bf31c06cb78c53b581a0.zip
Use coscmd instead of coscli.
Diffstat (limited to 'tool/aio.py')
-rwxr-xr-xtool/aio.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/tool/aio.py b/tool/aio.py
index a487228..00ae596 100755
--- a/tool/aio.py
+++ b/tool/aio.py
@@ -91,19 +91,6 @@ def check_domain_is_defined() -> str:
exit(1)
-def get_coscli_download_url() -> str:
- request = urllib.request.urlopen(
- "https://api.github.com/repos/tencentyun/coscli/releases/latest")
- response = request.read()
- # parse with json
- data = json.loads(response)
- assets = data["assets"]
- for asset in assets:
- if asset["name"] == "coscli-linux":
- return asset["browser_download_url"]
- raise ValueError("Cannot find coscli-linux in the latest release.")
-
-
def download_tools():
# if we are not linux, we prompt the user
if sys.platform != "linux":
@@ -113,8 +100,7 @@ def download_tools():
exit(0)
SCRIPTS = [("docker-mailserver setup script", "docker-mailserver-setup.sh",
- "https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/setup.sh"),
- ("coscli", "coscli", get_coscli_download_url)]
+ "https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/setup.sh")]
for index, script in enumerate(SCRIPTS):
number = index + 1
total = len(SCRIPTS)