openSUSE / obs-service-replace_using_package_version

An OBS service to replace a regex with some package version available in the build time repositories
GNU General Public License v3.0
4 stars 12 forks source link

Use the build recipe as default filename #5

Closed Vogtinator closed 2 years ago

Vogtinator commented 4 years ago

Currently, the file to do the replacements in has to be specified explicitly in the _service configuration. The name of the file which is being built by OBS is available to buildtime services like this:

BUILD_DATA="${BUILD_DIST/.dist/.data}"
. "${BUILD_DATA}"

# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
RECIPEFILE="${RECIPEFILE##*:}"

Which would be a sensible default. obs-service-kiwi_{label,metainfo}_helper do it that way as well.

davidcassany commented 4 years ago

I like the idea