mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
new function get_src_tarball_name; deprecates getsrcname
Some places in the code that need this, like verify.py, do not have app and build instances, but do have appid and versionCode. And fdroidserver/build.py is going away.
This commit is contained in:
parent
78865a7b2b
commit
56814824ee
2 changed files with 4 additions and 4 deletions
|
|
@ -306,7 +306,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
else:
|
else:
|
||||||
ftp.chdir(posixpath.join(homedir, 'unsigned'))
|
ftp.chdir(posixpath.join(homedir, 'unsigned'))
|
||||||
apkfile = common.get_release_filename(app, build)
|
apkfile = common.get_release_filename(app, build)
|
||||||
tarball = common.getsrcname(app, build)
|
tarball = common.get_src_tarball_name(app.id, build.versionCode)
|
||||||
try:
|
try:
|
||||||
ftp.get(apkfile, os.path.join(output_dir, apkfile))
|
ftp.get(apkfile, os.path.join(output_dir, apkfile))
|
||||||
if not options.notarball:
|
if not options.notarball:
|
||||||
|
|
@ -619,7 +619,7 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
|
||||||
if not options.notarball:
|
if not options.notarball:
|
||||||
# Build the source tarball right before we build the release...
|
# Build the source tarball right before we build the release...
|
||||||
logging.info("Creating source tarball...")
|
logging.info("Creating source tarball...")
|
||||||
tarname = common.getsrcname(app, build)
|
tarname = common.get_src_tarball_name(app.id, build.versionCode)
|
||||||
tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz")
|
tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz")
|
||||||
|
|
||||||
def tarexc(t):
|
def tarexc(t):
|
||||||
|
|
|
||||||
|
|
@ -1130,8 +1130,8 @@ def get_toolsversion_logname(app, build):
|
||||||
return "%s_%s_toolsversion.log" % (app.id, build.versionCode)
|
return "%s_%s_toolsversion.log" % (app.id, build.versionCode)
|
||||||
|
|
||||||
|
|
||||||
def getsrcname(app, build):
|
def get_src_tarball_name(appid, versionCode):
|
||||||
return "%s_%s_src.tar.gz" % (app.id, build.versionCode)
|
return f"{appid}_{versionCode}_src.tar.gz"
|
||||||
|
|
||||||
|
|
||||||
def get_build_dir(app):
|
def get_build_dir(app):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue