|
|
@ -10,6 +10,7 @@ class GitHub:
|
|
|
|
def __init__(self, config):
|
|
|
|
def __init__(self, config):
|
|
|
|
self.config = config
|
|
|
|
self.config = config
|
|
|
|
self._configs_url = None
|
|
|
|
self._configs_url = None
|
|
|
|
|
|
|
|
self._config_tags = []
|
|
|
|
|
|
|
|
|
|
|
|
def latest_release_notes(self):
|
|
|
|
def latest_release_notes(self):
|
|
|
|
response = self.config.get_json(f"{base_url}/releases/latest")
|
|
|
|
response = self.config.get_json(f"{base_url}/releases/latest")
|
|
|
@ -30,14 +31,22 @@ class GitHub:
|
|
|
|
return "\n".join(commits)
|
|
|
|
return "\n".join(commits)
|
|
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
@property
|
|
|
|
def configs_url(self):
|
|
|
|
def config_tags(self):
|
|
|
|
if self._configs_url is None:
|
|
|
|
if not self._config_tags:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
config_tags = [r["ref"][10:] for r in self.config.get_json(f"{base_url}-Configs/git/refs/tags")]
|
|
|
|
self._config_tags = [r["ref"][10:] for r in self.config.get_json(f"{base_url}-Configs/git/refs/tags")]
|
|
|
|
except TypeError:
|
|
|
|
except TypeError:
|
|
|
|
config_tags = []
|
|
|
|
pass
|
|
|
|
if self.config.version[1] in config_tags:
|
|
|
|
return self._config_tags
|
|
|
|
self._configs_url = f"{configs_raw_url}/{self.config.version[1]}/"
|
|
|
|
|
|
|
|
else:
|
|
|
|
@property
|
|
|
|
|
|
|
|
def configs_url(self):
|
|
|
|
|
|
|
|
if self._configs_url is None:
|
|
|
|
self._configs_url = f"{configs_raw_url}/master/"
|
|
|
|
self._configs_url = f"{configs_raw_url}/master/"
|
|
|
|
|
|
|
|
if self.config.latest_version[1] != self.config.version[1]:
|
|
|
|
|
|
|
|
if self.config.version[1] in self.config_tags:
|
|
|
|
|
|
|
|
self._configs_url = f"{configs_raw_url}/{self.config.version[1]}/"
|
|
|
|
|
|
|
|
elif not self.config.check_nightly and self.config.version[2] > 0:
|
|
|
|
|
|
|
|
if util.get_develop()[2] >= self.config.version[2]:
|
|
|
|
|
|
|
|
self._configs_url = f"{configs_raw_url}/{self.config.version[1]}/"
|
|
|
|
return self._configs_url
|
|
|
|
return self._configs_url
|
|
|
|