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

Commit

Permalink
Merge pull request #514 from gamechanger/tnt-release-script
Browse files Browse the repository at this point in the history
Add release script to setup dir
  • Loading branch information
thieman committed Aug 17, 2015
2 parents fbce7e9 + 18e6a5d commit df5b54f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions setup/release.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
from github3 import login

token = os.getenv('GITHUB_TOKEN')
gh = login(token=token)
repo = gh.repository('gamechanger', 'dusty')

version = os.getenv('VERSION')
prerelease = os.getenv('PRERELEASE') == 'true'

release_name = version
release = repo.create_release(version, name=release_name, prerelease=prerelease)

for setup_file in ['com.gamechanger.dusty.plist', 'install.sh']:
with open(os.path.join('setup', setup_file), 'r') as f:
release.upload_asset(content_type='text/plain',
name=setup_file,
asset=f)

for binary in ['dusty']:
with open(os.path.join('dist', binary), 'r') as f:
release.upload_asset(content_type='application/octet-stream',
name=binary,
asset=f)

0 comments on commit df5b54f

Please sign in to comment.