Skip to content

Commit

Permalink
fix: Select the command from multiple assets
Browse files Browse the repository at this point in the history
  • Loading branch information
jbmorley committed Sep 12, 2023
1 parent 90f529c commit a6e694b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ def main():
params={'per_page': 1})
assert len(releases) == 1
assets = gh.get(releases[0]['assets_url'])
assert len(assets) == 1
url = assets[0]['browser_download_url']
print(url)

# Select the correct asset.
for asset in assets:
if asset["name"].startswith("incontext-"):
print(asset["browser_download_url"])
exit()
exit("Failed to find command asset.")


if __name__ == "__main__":
Expand Down

0 comments on commit a6e694b

Please sign in to comment.