Skip to content

Commit

Permalink
Merge pull request #1 from inseven/jbmorley/select-the-correct-asset
Browse files Browse the repository at this point in the history
fix: Select the command from multiple assets
  • Loading branch information
jbmorley authored Sep 12, 2023
2 parents 90f529c + a6e694b commit a1751a5
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 a1751a5

Please sign in to comment.