lando / solr

The Official Solr Lando Plugin
https://docs.lando.dev/solr/
GNU General Public License v3.0
0 stars 7 forks source link

Support patch versions #27

Open pfrenssen opened 1 year ago

pfrenssen commented 1 year ago

I would like to be able to use a patch version of Solr, e.g.:

services:
  solr:
    type: solr:8.11.2

Currently if I use this then parseConfig() (https://github.com/lando/solr/blob/main/services/solr/builder.js#L109) doesn't recognize it and falls back to the generic config.

Maybe we can strip off the patch version before we do the comparison? Something like:

const parseConfig = options => {
  let version = options.version;
  if (version.includes('.')) {
     version = version.split('.').slice(0, 2).join('.');
  }
  switch (version) {
    case '3.6': return parse3(options);
    // ...
  }
}