Add PLATFORMS var for offline bundling
As discussed in https://github.com/cloudfoundry/java-buildpack/issues/986 there's a need to have PLATFORMS var to allow selecting between bionic and jammy for cflinuxfs3 and cflinuxfs4 stacks.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: AnnaAAL (0ce7b0dc09c7ac09cca5c5fe99ca7af10ad38ee8, c4e4fd2cae50a2d7bf1f5aef8f1f8bf77994a9d8)
Hi @dmikusa @pivotal-david-osullivan, would you consider this suggestion for fix to #986 ? With this proposal there's no need to compile both bionic and jammy, as the buildpack size is getting larger.
Thanks for putting this together! I think it's a great solution, and after talking with @pivotal-david-osullivan we can definitely include it.
The feedback we have is that we'd like to see a different default value applied. We'd prefer, for the time being, to have the default be both bionic and jammy.
David also did some testing and found that if thePLATFORM env is just empty then the default value is not applied. Checking against platform_var.empty? would be a good idea. If it's empty, assign the default.
You might also want to trim whitespace after you split on the ,. I didn't try it, but if someone enters bionic, jammy the extra space might cause issues.
Thanks again for the PR!
Hi @AnnaAAL, thanks again for the contribution! Are you able to make the adjustments suggested above to handle empty values/whitespace so we can get this merged?