Skip to content

Commit c9cc9d0

Browse files
Allow for variables in the package name of pkg_deb (#985)
* Allow for variables in the package name of pkg_deb
1 parent 173c5a3 commit c9cc9d0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/private/deb/deb.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"""Rule for creating Debian packages."""
1515

1616
load("//pkg:providers.bzl", "PackageVariablesInfo")
17-
load("//pkg/private:util.bzl", "setup_output_files")
17+
load("//pkg/private:util.bzl", "setup_output_files", "substitute_package_variables")
1818

1919
_tar_filetype = [".tar", ".tar.gz", ".tgz", ".tar.bz2", "tar.xz", "tar.zst"]
2020

@@ -38,12 +38,14 @@ def _pkg_deb_impl(ctx):
3838
changes_file = ctx.actions.declare_file(out_file_name_base + ".changes")
3939
outputs.append(changes_file)
4040

41+
package = substitute_package_variables(ctx, ctx.attr.package)
42+
4143
files = [ctx.file.data]
4244
args = ctx.actions.args()
4345
args.add("--output", output_file)
4446
args.add("--changes", changes_file)
4547
args.add("--data", ctx.file.data)
46-
args.add("--package", ctx.attr.package)
48+
args.add("--package", package)
4749
args.add("--maintainer", ctx.attr.maintainer)
4850

4951
if ctx.attr.architecture_file:

0 commit comments

Comments
 (0)