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. 10
      fwsreleasers/main.py
  2. 5
      releasers.conf

@ -24,7 +24,15 @@ class RsyncSRPMSReleaser(RsyncReleaser):
target=None, releaser_config=None, no_cleanup=False,
test=False, auto_accept=False,
prefix="temp_dir=", **kwargs):
RsyncReleaser.__init__(self, name, tag, build_dir, config,
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,
user_config, target, releaser_config, no_cleanup, test,
auto_accept, **kwargs)

@ -12,3 +12,8 @@ rsync = build.firewall-services.com:/var/lib/build/uploads/el6
releaser = fwsreleasers.RsyncSRPMSReleaser
srpm_disttag = .fws
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