mirror of https://gerrit.osmocom.org/osmo-ci
obs: add --version-append argument
Related: OS#2537 Change-Id: Iff5a530bebd645be13e0206ce0a670e1dfe6e2f9
This commit is contained in:
parent
dc1415959f
commit
1ab4ce32f9
|
@ -63,6 +63,10 @@ def add_shared_arguments(parser):
|
|||
parser.add_argument("-v", "--verbose", action="store_true",
|
||||
help="always print shell commands and their output,"
|
||||
" instead of only printing them on error")
|
||||
parser.add_argument("-e", "--version-append",
|
||||
help="add a string at the end of the version, e.g."
|
||||
" '~osmocom' for the wireshark package to"
|
||||
" indicate that it is the version from our repo")
|
||||
|
||||
|
||||
def set_cmds_verbose(new_val):
|
||||
|
|
|
@ -136,15 +136,21 @@ def write_commit_txt(project):
|
|||
def build(project, gerrit_id=0):
|
||||
conflict_version = lib.args.conflict_version
|
||||
feed = lib.args.feed
|
||||
version_append = lib.args.version_append
|
||||
|
||||
lib.git.clone(project)
|
||||
lib.git.clean(project)
|
||||
if gerrit_id > 0:
|
||||
lib.git.checkout_from_review(project, gerrit_id)
|
||||
else:
|
||||
checkout_for_feed(project)
|
||||
|
||||
version = get_version_for_feed(project)
|
||||
if version_append:
|
||||
version += version_append
|
||||
epoch = get_epoch(project)
|
||||
version_epoch = f"{epoch}:{version}" if epoch else version
|
||||
|
||||
has_rpm_spec = lib.rpm_spec.get_spec_in_path(project) is not None
|
||||
|
||||
print(f"{project}: building source package {version_epoch}")
|
||||
|
|
Loading…
Reference in New Issue