bazelbuild / rules_pkg

Bazel rules for creating packages of many types (zip, tar, deb, rpm, ...)
Apache License 2.0
221 stars 174 forks source link

Exclude release from filename when using release_file #863

Closed kellyma2 closed 5 months ago

kellyma2 commented 5 months ago

When we're using release_file in lieu of release we're just pointing rpmbuild at the file containing the Release string and we don't have it available to inject into the filename resulting in a strange looking filename of the form Foo-version-.arch.rpm.

This change extracts the RPM name generation to a single helper, _make_rpm_filename and tweaks it s.t. if we're missing the value for release we'll just exclude it from the filename format instead.