Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
Make main() async (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon authored Apr 8, 2020
1 parent 04ac562 commit 78979a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions release_often/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def create_release(gh, version, changelog_entry):
return await release.create(gh, releases_url, version, changelog_entry)


if __name__ == "__main__":
async def main():
args = parse_args()
new_version = update_version()
if new_version is None:
Expand All @@ -124,4 +124,8 @@ async def create_release(gh, version, changelog_entry):
gh = gidgethub.httpx.GitHubAPI(
client, "brettcannon/release_often", oauth_token=args.github_token
)
trio.run(create_release, gh, new_version, changelog_entry)
await create_release(gh, new_version, changelog_entry)


if __name__ == "__main__":
trio.run(main)

0 comments on commit 78979a5

Please sign in to comment.