Add SLES11 support to rpm package (#2768)
This commit is contained in:
@@ -636,6 +636,10 @@ def package(build_output, pkg_name, version, nightly=False, iteration=1, static=
|
||||
elif package_type not in ['zip', 'tar'] and static or "static_" in arch:
|
||||
logging.info("Skipping package type '{}' for static builds.".format(package_type))
|
||||
else:
|
||||
if package_type == 'rpm' and release and '~' in package_version:
|
||||
package_version, suffix = package_version.split('~', 1)
|
||||
# The ~ indicatees that this is a prerelease so we give it a leading 0.
|
||||
package_iteration = "0.%s" % suffix
|
||||
fpm_command = "fpm {} --name {} -a {} -t {} --version {} --iteration {} -C {} -p {} ".format(
|
||||
fpm_common_args,
|
||||
name,
|
||||
@@ -664,9 +668,6 @@ def package(build_output, pkg_name, version, nightly=False, iteration=1, static=
|
||||
if package_type == 'rpm':
|
||||
# rpm's convert any dashes to underscores
|
||||
package_version = package_version.replace("-", "_")
|
||||
new_outfile = outfile.replace("{}-{}".format(package_version, package_iteration), package_version)
|
||||
os.rename(outfile, new_outfile)
|
||||
outfile = new_outfile
|
||||
outfiles.append(os.path.join(os.getcwd(), outfile))
|
||||
logging.debug("Produced package files: {}".format(outfiles))
|
||||
return outfiles
|
||||
|
||||
Reference in New Issue
Block a user