Support last_version and short_version paceholders in github releases
This commit is contained in:
@ -87,6 +87,7 @@ def githubmastersync(reponame, filepaths, credz):
|
||||
def githubreleasesync(reponame, repoinfo, credz):
|
||||
local_version = repoinfo['local_version']
|
||||
last_version = get_last_release_info(reponame, credz)
|
||||
short_version = last_version.replace('v', '')
|
||||
|
||||
filenames = repoinfo['files']
|
||||
|
||||
@ -94,12 +95,14 @@ def githubreleasesync(reponame, repoinfo, credz):
|
||||
if isinstance(filename, dict):
|
||||
binpath = filename['binpath']
|
||||
filename = filename['filename']
|
||||
filename = filename.replace('{last_version}', last_version).replace('{short_version}', short_version)
|
||||
localfile = pathlib.Path('files').joinpath(pathlib.Path(binpath).name)
|
||||
if filename.endswith('.gz'):
|
||||
is_gz = True
|
||||
print(f" * {localfile} ", end='')
|
||||
|
||||
else:
|
||||
filename = filename.replace('{last_version}', last_version).replace('{short_version}', short_version)
|
||||
localfile = pathlib.Path('files').joinpath(pathlib.Path(filename).name)
|
||||
print(f" * {localfile} ", end='')
|
||||
|
||||
|
Reference in New Issue
Block a user