Merge branch 'general-devel' of github.com:NyxStudios/TShock into general-devel
This commit is contained in:
commit
4dba4d0116
1 changed files with 6 additions and 5 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
import requests
|
import urllib2
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
req_url = 'https://api.github.com/repos/NyxStudios/TShock/releases'
|
||||||
branch = os.environ["GIT_BRANCH"]
|
branch = os.environ["GIT_BRANCH"]
|
||||||
tag_name = os.environ["bamboo_tag_name"]
|
tag_name = os.environ["bamboo_tag_name"]
|
||||||
name = os.environ["bamboo_release_name"]
|
name = os.environ["bamboo_release_name"]
|
||||||
|
|
@ -14,9 +15,9 @@ with open('/home/bamboo/scripts/token.py') as f:
|
||||||
body = 'This is the newest release for TShock. Please see the release thread for more information @ http://tshock.co/xf'
|
body = 'This is the newest release for TShock. Please see the release thread for more information @ http://tshock.co/xf'
|
||||||
|
|
||||||
data = {'tag_name':tag_name, 'target_commitish':branch, 'name':name, 'body':body, 'draft':False, 'prerelease':False}
|
data = {'tag_name':tag_name, 'target_commitish':branch, 'name':name, 'body':body, 'draft':False, 'prerelease':False}
|
||||||
|
|
||||||
headers = {'Content-Type': 'application/json', 'Authorization': 'token ' + token}
|
headers = {'Content-Type': 'application/json', 'Authorization': 'token ' + token}
|
||||||
|
|
||||||
print json.dumps(data)
|
json_data = json.dumps(data)
|
||||||
req = requests.post('https://api.github.com/repos/NyxStudios/TShock/releases', data = json.dumps(data), headers = headers)
|
req = urllib2.Request(req_url, json_data, headers)
|
||||||
|
urllib2.urlopen(req)
|
||||||
print req.text
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue