Add a special "branch" releaser

If used, tito will use the name of our current GIT branch as release target if it's valid
master
Daniel Berteaud 7 years ago
parent efadc720d4
commit 14d372de9f
  1. 8
      fwsreleasers/main.py
  2. 5
      releasers.conf

@ -24,6 +24,14 @@ class RsyncSRPMSReleaser(RsyncReleaser):
target=None, releaser_config=None, no_cleanup=False, target=None, releaser_config=None, no_cleanup=False,
test=False, auto_accept=False, test=False, auto_accept=False,
prefix="temp_dir=", **kwargs): prefix="temp_dir=", **kwargs):
if target == 'branch':
target = run_command('git symbolic-ref --short HEAD')
if target in [ 'el5', 'el6', 'el7', 'sme9', 'sme10' ]:
# Call ourselve with the new target
self.__init__(name, tag, build_dir, config,
user_config, target, releaser_config, no_cleanup, test,
auto_accept, **kwargs)
else:
RsyncReleaser.__init__(self, name, tag, build_dir, config, RsyncReleaser.__init__(self, name, tag, build_dir, config,
user_config, target, releaser_config, no_cleanup, test, user_config, target, releaser_config, no_cleanup, test,
auto_accept, **kwargs) auto_accept, **kwargs)

@ -12,3 +12,8 @@ rsync = build.firewall-services.com:/var/lib/build/uploads/el6
releaser = fwsreleasers.RsyncSRPMSReleaser releaser = fwsreleasers.RsyncSRPMSReleaser
srpm_disttag = .fws srpm_disttag = .fws
rsync = build.firewall-services.com:/var/lib/build/uploads/el7 rsync = build.firewall-services.com:/var/lib/build/uploads/el7
[branch]
releaser = fwsreleasers.RsyncSRPMSReleaser
srpm_disttag = .fws
rsync = build.firewall-services.com:/var/lib/build/uploads/branch

Loading…
Cancel
Save