Skip to content

Commit

Permalink
[fix][website]: Pulsar IO Connectors release url error of some versio…
Browse files Browse the repository at this point in the history
…ns(for example: 2.10.0) (apache#15231)
  • Loading branch information
urfreespace authored Apr 24, 2022
1 parent 1344b33 commit 8679ef5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion site2/website/scripts/replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 8679ef5

Please sign in to comment.