allow substring of substvar
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-build-recipe |
New
|
Undecided
|
Unassigned |
Bug Description
I would be really nice to allow basic string manipulation options on substitution variables. My specific issue is that I'd like to extract a debian complaint version out of {latest-tag}. Perhaps the syntax for could be bash-like (eg. if substvar "{latest-tag}" expands to "v1.4.5-rc1", then "{latest-tag:1}" would expand to "1.4.5-rc1").
Right now, in order to have fully automated daily builds using {latest-tag} as the version for some projects, I'm resorting to using "1:0.{latest-tag}". Thus the real version is encoded in the package version, but this is less than ideal. It means that if for instance an official package is released with a version (not epoch) greater than mine, the end user will not get an update. This can happen when the daily build is broken for some reason.
I think an acceptable first pass is to just allow prefix removal on that specific variable.