Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tools/misc/gen_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ def release(self):
data = response.json()
self.upload_url = data['upload_url'].replace('{?name,label}', '?name=')
log.info('Release id %s created', data['id'])

def artifact_name(self, artifact):
arch = self._arch(artifact)
return os.path.basename(artifact).replace(self.version, self.version + '_' + arch)

def upload(self, artifact:str):
"""Uploads the given artifact to the new release."""
# Artifact names aren't unique between OSs; make them so.

filename = self.artifact_name(artifact)
_, ext = os.path.splitext(filename)
content_type = self.known_content_types.get(ext, 'application/octet-stream')
Expand Down Expand Up @@ -195,7 +195,7 @@ def main(argv):
for file in release_files:
r.upload(file)
if FLAGS.circleci_token and not FLAGS.dry_run:
r.trigger_build(FLAGS.circleci_token, 'thought-machine/homebrew-please')
r.trigger_build(FLAGS.circleci_token, 'please-build/homebrew')


if __name__ == '__main__':
Expand Down
Loading