From 4c73ceaa39d3d9419e187700f95a9f6caa16b27f Mon Sep 17 00:00:00 2001 From: Raoul Wols Date: Wed, 23 Sep 2020 17:56:29 +0200 Subject: [PATCH] Detect single-file releases --- auto-update-repository.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/auto-update-repository.py b/auto-update-repository.py index 1898be9..94752f6 100644 --- a/auto-update-repository.py +++ b/auto-update-repository.py @@ -39,7 +39,10 @@ def extract_platform_from_asset_name(name: str) -> str: - `linux-x32` - `linux-x64` """ - return name.split(".")[-2].split("_")[-1] + for needle in ("_windows", "_osx", "_linux"): + if needle in name: + return name.split(".")[-2].split("_")[-1] + return "*" def translate_date(gh_date: str) -> str: @@ -68,7 +71,7 @@ def translate_release_asset( exit(1) return { "url": asset["browser_download_url"], - "platforms": [extract_platform_from_asset_name(name)], + "platforms": extract_platform_from_asset_name(name), "date": date, "version": tag_name, "sublime_text": sublime_text_version_range