Skip to content

Commit

Permalink
Detect single-file releases
Browse files Browse the repository at this point in the history
  • Loading branch information
rwols committed Sep 23, 2020
1 parent 5a0ab33 commit 4c73cea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions auto-update-repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4c73cea

Please sign in to comment.