Browse Source

Fix for wrong version tag (#3517)

* Fix for wrong version tag (tag on the release branch instead of master)
pull/3518/head
Greg Szabo 6 years ago
committed by Ismail Khoffi
parent
commit
0ae41cc663
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      scripts/release_management/github-draft.py

+ 4
- 3
scripts/release_management/github-draft.py View File

@ -29,10 +29,10 @@ def request(org, repo, data):
return json.loads(responsedata)
def create_draft(org,repo,version):
def create_draft(org,repo,branch,version):
draft = {
'tag_name': version,
'target_commitish': 'master',
'target_commitish': '{0}'.format(branch),
'name': '{0} (WARNING: ALPHA SOFTWARE)'.format(version),
'body': '<a href=https://github.com/{0}/{1}/blob/master/CHANGELOG.md#{2}>https://github.com/{0}/{1}/blob/master/CHANGELOG.md#{2}</a>'.format(org,repo,version.replace('v','').replace('.','')),
'draft': True,
@ -45,6 +45,7 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--org", default="tendermint", help="GitHub organization")
parser.add_argument("--repo", default="tendermint", help="GitHub repository")
parser.add_argument("--branch", default=os.environ.get('CIRCLE_BRANCH'), help="Branch to build from, e.g.: v1.0")
parser.add_argument("--version", default=os.environ.get('CIRCLE_TAG'), help="Version number for binary, e.g.: v1.0.0")
args = parser.parse_args()
@ -54,7 +55,7 @@ if __name__ == "__main__":
if not os.environ.has_key('GITHUB_TOKEN'):
raise parser.error('environment variable GITHUB_TOKEN is required')
release = create_draft(args.org,args.repo,args.version)
release = create_draft(args.org,args.repo,args.branch,args.version)
print(release["id"])

Loading…
Cancel
Save