Skip to content

Commit

Permalink
Update make_munkireport_release.py
Browse files Browse the repository at this point in the history
Add certifi to fix certificate issues
  • Loading branch information
bochoven committed Jun 20, 2023
1 parent 0a7ce07 commit fc058b3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions build/release/make_munkireport_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
import json
import optparse
import os
import plistlib
import certifi
import ssl
import re
import subprocess
import sys
Expand Down Expand Up @@ -52,7 +53,9 @@ def api_call(endpoint, token, baseurl='https://api.github.com', data=None,

req = urllib.request.Request(baseurl + endpoint, headers=headers)
try:
results = urllib.request.urlopen(req, data=data)
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
context.load_verify_locations(certifi.where())
results = urllib.request.urlopen(req, data=data, context=context)
except urllib.error.HTTPError as err:
print("HTTP error making API call!", file=sys.stderr)
print(err, file=sys.stderr)
Expand Down Expand Up @@ -248,11 +251,12 @@ def main():
set_version('%s.%s' % (clean_version(next_version), get_commit_count() + 1))

# increment changelog
new_changelog = "### [{0}](https://github.com/{1}/{2}/compare/v{3}...wip) (Unreleased)\n\n".format(
new_changelog = "### [{0}](https://github.com/{1}/{2}/compare/v{3}...{4}) (Unreleased)\n\n".format(
next_version,
publish_user,
publish_repo,
current_version) + new_changelog
current_version,
branch) + new_changelog
with open(changelog_path, 'w') as fdesc:
fdesc.write(new_changelog)

Expand Down

0 comments on commit fc058b3

Please sign in to comment.