Skip to content

Commit

Permalink
release_github: fixup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zougloub committed Jul 1, 2020
1 parent e40909d commit 820db8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions distriploy/release_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ def release(repo_path, revision, cfg_root) -> dict:
local_path = download_default_release_asset(github_repo, release_id, github_token, tmpdir)
ret["artifact_path"] = local_path

if not releases[release_id]["assets"]:
url = upload_release_asset(github_repo, release_id, local_path, github_token)
else:
if release_id in releases and releases[release_id]["assets"]:
url = releases[release_id]["assets"][0]["browser_download_url"]
else:
url = upload_release_asset(github_repo, release_id, local_path, github_token)

ret["artifact_url"] = url

Expand Down

0 comments on commit 820db8e

Please sign in to comment.