Closed FALLAI-Denis closed 10 months ago
@FALLAI-Denis, as you know we also accept a pull request from zAppBuild users :-)
Yes, fetching the prefix from the language script name might be the most flexible one to implement.
Delivered via zAppBuild Release 3.4.0 (#392). Feedback welcome via #410
Hi,
The
BuildUtilities.groovy
script declares thegetLangPrefix(String scriptName)
function which is used by various functions. This function tries to determine the language from the name of the language script.We made the choice not to modify the zAppbuild language scripts, but each time to duplicate them when we want to make a specific version to our context. This has an impact on the
getLangPrefix
function and as it stands forces us to modify theBuildUtilities.groovy
script, which we would like to avoid...We have chosen to suffix the name of the standard language script to create a new script. Example:
CobolXXXX.groovy
to replaceCobol.groovy
. Maybe we should have named them<language>_XXXX.groovy
...To avoid having to modify the
getLangPrefix
function, it should not test the full name of the language script, but only part of it.In a naming plan of the form
<language>XXXX.groovy
, you should test with thestartWith()
function:In a naming scheme of the form
<language>_XXXX.groovy
, the script name should be cut on the separator character, then test the part bearing the name of the language:Or in an even simpler way, because langPrefix is always the suffix used by scritp language:
In short, it would seem useful to us to define a standard for naming custom language scripts and to modify the zAppbuild functions to take this standard into account and not to have to modify them on site.
Thanks.