summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2016-08-31 17:10:29 -0400
committerScott Moser <smoser@brickies.net>2016-08-31 17:10:29 -0400
commit2ddaa93b870bb0953a5a23b0eab155b21dd05a0f (patch)
tree24d28f7cb7a44431271d4cbdae108fa6a3bd0362 /packages
parent763f403c7b848b31780ef869fb7728b0d5e571a2 (diff)
downloadvyos-cloud-init-2ddaa93b870bb0953a5a23b0eab155b21dd05a0f.tar.gz
vyos-cloud-init-2ddaa93b870bb0953a5a23b0eab155b21dd05a0f.zip
bddeb: add --release flag to specify the release in changelog.
./packages/bddeb --release=xenial that will get you a changelog with Distribution of xenial rather than UNRELEASED.
Diffstat (limited to 'packages')
-rwxr-xr-xpackages/bddeb13
-rw-r--r--packages/debian/changelog.in2
2 files changed, 11 insertions, 4 deletions
diff --git a/packages/bddeb b/packages/bddeb
index 94496c74..abb7b607 100755
--- a/packages/bddeb
+++ b/packages/bddeb
@@ -67,7 +67,7 @@ def run_helper(helper, args=None, strip=True):
return stdout
-def write_debian_folder(root, version_data, pkgmap, pyver="3",
+def write_debian_folder(root, templ_data, pkgmap, pyver="3",
append_requires=[]):
deb_dir = util.abs_join(root, 'debian')
@@ -79,7 +79,7 @@ def write_debian_folder(root, version_data, pkgmap, pyver="3",
templater.render_to_file(util.abs_join(find_root(),
'packages', 'debian', 'changelog.in'),
util.abs_join(deb_dir, 'changelog'),
- params=version_data)
+ params=templ_data)
# Write out the control file template
reqs = run_helper('read-dependencies').splitlines()
@@ -147,6 +147,10 @@ def main():
default=os.environ.get("INIT_SYSTEM",
"upstart,systemd"))
+ parser.add_argument("--release", dest="release",
+ help=("build with changelog referencing RELEASE"),
+ default="UNRELEASED")
+
for ent in DEBUILD_ARGS:
parser.add_argument(ent, dest="debuild_args", action='append_const',
const=ent, default=[],
@@ -184,6 +188,7 @@ def main():
pkgmap[p] = "python3-" + p
pyver = "3"
+ templ_data = {'debian_release': args.release}
with util.tempdir() as tdir:
# output like 0.7.6-1022-g36e92d3
@@ -208,7 +213,9 @@ def main():
append_requires = ['cloud-utils | cloud-guest-utils']
else:
append_requires = []
- write_debian_folder(xdir, ver_data, pkgmap,
+
+ templ_data.update(ver_data)
+ write_debian_folder(xdir, templ_data, pkgmap,
pyver=pyver, append_requires=append_requires)
print("Running 'debuild %s' in %r" % (' '.join(args.debuild_args),
diff --git a/packages/debian/changelog.in b/packages/debian/changelog.in
index f8e98258..bdf8d56f 100644
--- a/packages/debian/changelog.in
+++ b/packages/debian/changelog.in
@@ -1,5 +1,5 @@
## template:basic
-cloud-init (${version_long}-1~bddeb) UNRELEASED; urgency=low
+cloud-init (${version_long}-1~bddeb) ${debian_release}; urgency=low
* build