Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollo3zehn committed Jul 22, 2022
1 parent 8912c01 commit 187230d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build/release.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import itertools
import subprocess
import sys
import re
import json

import requests

Expand All @@ -17,11 +19,14 @@
print(" master branch: OK")

# check if release version already exist
access_token = sys.argv[1]
request_url = f"https://api.github.com/repos/nexuforge/nexus/releases"
with open("solution.json", "r") as fh:
solution_data = json.load(fh)

pattern = r"https:\/\/github.com\/(.*)"
request_url = re.sub(pattern, r"https://api.github.com/repos/\1/releases", solution_data["repository-url"])

headers = {
"Authorization": f"token {access_token}",
"Authorization": f"token {sys.argv[1]}",
"User-Agent": "Nexus",
"Accept": "application/vnd.github.v3+json"
}
Expand Down

0 comments on commit 187230d

Please sign in to comment.