:lipstick: Find the release even when commit isn't tagged.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 26 Sep 2013 11:54:28 +0000 (19:54 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 26 Sep 2013 11:54:28 +0000 (19:54 +0800)
script/upload.py

index cf6b655..9cfba99 100755 (executable)
@@ -69,9 +69,11 @@ def dist_newer_than_head():
 
 
 def create_or_get_release_draft(github, tag):
+  name = 'atom-shell %s' % tag
   releases = github.repos(ATOM_SHELL_REPO).releases.get()
   for release in releases:
-    if release['tag_name'] == tag:
+    # The untagged commit doesn't have a matching tag_name, so also check name.
+    if release['tag_name'] == tag or release['name'] == name:
       return release['id']
 
   return create_release_draft(github, tag)