|
93 | 93 | version_info.update(parse_version_info(os.path.join(artifact_dir, "install-x64", "share", repo_name)))
|
94 | 94 | output(str(version_info))
|
95 | 95 |
|
| 96 | + # Get version info |
| 97 | + openshot_qt_version = version_info.get('openshot-qt', {}).get('VERSION', 'N/A') |
| 98 | + |
96 | 99 | # Verify branch names are all the same (across the 3 repos)
|
97 | 100 | original_git_branch = ''
|
98 | 101 | for repo_name in repo_names:
|
|
263 | 266 |
|
264 | 267 | # Submit blog post (if it doesn't already exist) (in draft mode)
|
265 | 268 | auth = HTTPBasicAuth(os.getenv('OPENSHOT_ORG_USER'), os.getenv('OPENSHOT_ORG_PASS'))
|
266 |
| - r = post("https://www.openshot.org/api/release/submit/", auth=auth, data={ "version": github_release.tag_name, |
| 269 | + r = post("https://www.openshot.org/api/release/submit/", auth=auth, data={ "version": openshot_qt_version, |
267 | 270 | "changelog": log_title + combined_log_markdown })
|
268 | 271 | if not r.ok:
|
269 | 272 | raise Exception("HTTP post to openshot.org/api/release/submit/ failed: %s (user: %s): %s" %
|
270 |
| - (r.status_code, os.getenv('OPENSHOT_ORG_USER'), |
271 |
| - r.json().get('message', 'no error message found'))) |
| 273 | + (r.status_code, os.getenv('OPENSHOT_ORG_USER'), r.content.decode('UTF-8'))) |
272 | 274 | else:
|
273 |
| - # Get release object |
274 |
| - openshot_qt_version = version_info.get('openshot-qt', {}).get('VERSION', 'N/A') |
275 |
| - |
276 | 275 | # Publish the release (make new version visible on openshot.org, and make blog post visible)
|
277 | 276 | auth = HTTPBasicAuth(os.getenv('OPENSHOT_ORG_USER'), os.getenv('OPENSHOT_ORG_PASS'))
|
278 | 277 | r = post("https://www.openshot.org/api/release/publish/", auth=auth, data={"version": openshot_qt_version })
|
279 | 278 | if not r.ok:
|
280 | 279 | raise Exception("HTTP post to openshot.org/api/release/publish/ failed: %s (user: %s): %s" %
|
281 |
| - (r.status_code, os.getenv('OPENSHOT_ORG_USER'), |
282 |
| - r.json().get('message', 'no error message found'))) |
| 280 | + (r.status_code, os.getenv('OPENSHOT_ORG_USER'), r.content.decode('UTF-8'))) |
283 | 281 |
|
284 | 282 | # Publish GitHub Release objects (in all 3 repos)
|
285 | 283 | for repo_name in repo_names:
|
|
0 commit comments