[fix][website]: Pulsar IO Connectors release url error of some versions(for example: 2.10.0)
@@ -30,9 +30,12 @@ function binaryReleaseUrl(version) {
}
function connectorReleaseUrl(version) {
+ var versions = version.split(".");
+ var majorVersion = parseInt(versions[0]);
+ var minorVersion = parseInt(versions[1]);
if (version.includes('incubating')) {
return `https://archive.apache.org/dist/incubator/pulsar/pulsar-${version}/apache-pulsar-io-connectors-${version}-bin.tar.gz`
- } else if (version >= '2.3.0') {
+ } else if (majorVersion > 2 || (majorVersion == 2 && minorVersion >= 3)) {
return `https://archive.apache.org/dist/pulsar/pulsar-${version}/connectors`
} else {
return `https://archive.apache.org/dist/pulsar/pulsar-${version}/apache-pulsar-io-connectors-${version}-bin.tar.gz`
