google / rpmpack

rpmpack (tar2rpm) - package rpms in pure golang or cli
Apache License 2.0
116 stars 32 forks source link

Add support for `version_file` in `pkg_tar2rpm` #63

Open phlax opened 3 years ago

phlax commented 3 years ago

It would be very helpful if a version file was supported for setting the package version - as eg pkg_deb does

if a version file could be passed in it would allow pkg_tar2rpm to read version info directly from eg a VERSION file rather than having to duplicate/hardcode the current version in BUILD/bzl files in addition to the canonical setting

jarondl commented 2 years ago

What is the structure of the VERSION file? are we talking about a text file containing only one string? And do you want to pass it as the version flag to rpmpack? If so, does this only require changes in the bzl file.. https://github.com/google/rpmpack/blob/master/def.bzl#L6

phlax commented 2 years ago

are we talking about a text file containing only one string?

yep, i think that is how pkg_deb works (cf https://docs.bazel.build/versions/1.0.0/be/pkg.html#pkg_deb)