mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Update publish.py
This commit is contained in:
parent
864bb342d0
commit
c4059af010
|
@ -10,9 +10,21 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
platform=''
|
||||||
|
if (len(sys.argv) >= 3):
|
||||||
|
platform=sys.argv[2]
|
||||||
|
|
||||||
versionNumber = str(time.time())
|
versionNumber = str(time.time())
|
||||||
version = 'qtox-'+versionNumber
|
if (platform != ''):
|
||||||
title = 'qTox '+datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')
|
version = 'qtox-'+platform+'-'+versionNumber
|
||||||
|
else:
|
||||||
|
version = 'qtox-'+versionNumber
|
||||||
|
if (platform == 'windows'):
|
||||||
|
title = 'qTox Windows '+datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
|
elif (platform == 'linux'):
|
||||||
|
title = 'qTox Linux '+datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
|
else:
|
||||||
|
title = 'qTox '+datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
user = "tux3"
|
user = "tux3"
|
||||||
password = ""
|
password = ""
|
||||||
if password == "":
|
if password == "":
|
||||||
|
@ -25,8 +37,9 @@ if not (user and password):
|
||||||
|
|
||||||
g = login(user, password)
|
g = login(user, password)
|
||||||
repo = g.repository('tux3', 'qTox')
|
repo = g.repository('tux3', 'qTox')
|
||||||
release = repo.create_release(version,'master',title,'This is an automated release of qTox, published by qTox\'s continous integration server.',True,False)
|
release = repo.create_release(version,'master',title,'This is an automated release of qTox, published by qTox\'s continous integration server.',False,False)
|
||||||
|
|
||||||
if (len(sys.argv) >= 2):
|
if (len(sys.argv) >= 2):
|
||||||
file = open(sys.argv[1], 'r')
|
file = open(sys.argv[1], 'r')
|
||||||
release.upload_asset('application/octet-stream',sys.argv[1],file)
|
release.upload_asset('application/octet-stream',sys.argv[1],file)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user