| 12 | // e.g., free-pro-team@latest, where free-pro-team is the plan and latest is the release |
| 13 | // in addition to legacy formats where the version passed is simply 2.21 |
| 14 | function splitVersion(version) { |
| 15 | // The default plan when working with versions is "enterprise-server". |
| 16 | // Default to that value here to support backward compatibility from before |
| 17 | // plans were explicitly included. |
| 18 | let plan = 'enterprise-server' |
| 19 | let release |
| 20 | |
| 21 | const lastIndex = version.lastIndexOf('@') |
| 22 | if (lastIndex === -1) { |
| 23 | release = version |
| 24 | } else { |
| 25 | plan = version.slice(0, lastIndex) |
| 26 | release = version.slice(lastIndex + 1) |
| 27 | } |
| 28 | |
| 29 | return [plan, release] |
| 30 | } |
| 31 | |
| 32 | const engine = new Liquid({ |
| 33 | root: path.join(process.cwd(), 'includes'), |