Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_version(self):
releases = api_request('tools-usb-ftdi/releases/latest')
if releases is not None and 'tag_name' in releases:
version = releases['tag_name'].split('.')[1] # v0.X -> X
return version
def _get_version(self):
releases = api_request('Platformio-FPGA/releases/latest')
if releases is not None and 'tag_name' in releases:
version = releases['tag_name'].split('.')[1] # 0.X -> X
return version
def _get_version(self):
releases = api_request('toolchain-icestorm/releases/latest')
if releases is not None and 'tag_name' in releases:
version = releases['tag_name'].split('.')[1] # 0.X -> X
return version
def _get_version(self):
releases = api_request('toolchain-iverilog/releases/latest')
if releases is not None and 'tag_name' in releases:
version = releases['tag_name'].split('.')[1] # v0.X -> X
return version
def _get_valid_version(self, rel_name, organization, tag_name):
# Download latest releases list
releases = api_request('{}/releases'.format(rel_name), organization)
if self.version:
# Find required version via @
if not util.check_package_version(self.version, self.spec_version):
util.show_package_version_warning(
self.package, self.version, self.spec_version)
exit(1)
return self._find_required_version(
releases, tag_name, self.version, self.spec_version)
else:
# Find latest version release
return self._find_latest_version(
releases, tag_name, self.spec_version)
def _get_version(self):
releases = api_request('tool-scons/releases/latest')
if releases is not None and 'tag_name' in releases:
version = releases['tag_name'][1:] # vX -> X
return version
def _get_version(self, name, organization, tag_name):
version = ''
releases = api_request('{}/releases/latest'.format(name), organization)
if releases is not None and 'tag_name' in releases:
pattern = tag_name.replace('%V', '(?P.*?)') + '$'
match = re.search(pattern, releases['tag_name'])
if match:
version = match.group('v')
return version
def _get_version(self):
tags = api_request('apio-examples/tags')
if tags is not None and type(tags) == list and \
len(tags) > 0 and 'name' in tags[0]:
version = tags[0]['name']
return version