diff --git a/src/pages/download/index.jsx b/src/pages/download/index.jsx index 6ada96981..17702578d 100644 --- a/src/pages/download/index.jsx +++ b/src/pages/download/index.jsx @@ -10,13 +10,8 @@ export default function () { const isBrowser = useIsBrowser(); const language = isBrowser && location.pathname.indexOf('/zh-CN/') === 0 ? 'zh-CN' : 'en'; const dataSource = config?.[language]; - let latest = downloadDataSource[0]; - downloadDataSource.forEach((item) => { - if (item.date > latest.date) { - latest = item; - } - }) - const lastRelease = [latest] + const lastRelease = [downloadDataSource[0]]; + const archived = downloadDataSource.slice(1, downloadDataSource.length) return (
@@ -44,7 +39,7 @@ export default function () {

{dataSource.latestVersion}

- +

{dataSource.archived}

@@ -56,7 +51,7 @@ export default function () {
  • {dataSource.note}
  • - +

    License

    diff --git a/src/pages/download/table.jsx b/src/pages/download/table.jsx index 169d0304f..f82f871c6 100644 --- a/src/pages/download/table.jsx +++ b/src/pages/download/table.jsx @@ -4,29 +4,55 @@ import config from './languages.json' export default function (props) { const tableData = props.dataSource || [] + const latest = props.latest || false const isBrowser = useIsBrowser(); const language = isBrowser && location.pathname.indexOf('/zh-CN/') === 0 ? 'zh-CN' : 'en' const dataSource = config?.[language]; - function getSourceLink(version, suffix) { - return 'https://www.apache.org/dyn/closer.lua/incubator/streampark/' - .concat(version) - .concat('/apache-streampark-') - .concat(version) - .concat('-incubating-src.tar.gz') - .concat(suffix) - } + function getSourceLink(version) { + const prefix = latest + ? 'https://www.apache.org/dyn/closer.lua/incubator/streampark/' + : 'https://archive.apache.org/dist/incubator/streampark/'; - function getBinaryLink(scala, version, suffix) { - return 'https://www.apache.org/dyn/closer.lua/incubator/streampark/' - .concat(version) - .concat('/apache-streampark_') - .concat(scala) - .concat('-') - .concat(version) - .concat('-incubating-bin.tar.gz') - .concat(suffix) - } + return prefix + .concat(version) + .concat('/apache-streampark-') + .concat(version) + .concat('-incubating-src.tar.gz') + } + + function getSourceSigs(version, suffix) { + return 'https://downloads.apache.org/incubator/streampark/' + .concat(version) + .concat('/apache-streampark-') + .concat(version) + .concat('-incubating-src.tar.gz') + .concat(suffix) + } + + function getBinaryLink(scala, version) { + const prefix = latest + ? 'https://www.apache.org/dyn/closer.lua/incubator/streampark/' + : 'https://archive.apache.org/dist/incubator/streampark/'; + return prefix + .concat(version) + .concat('/apache-streampark_') + .concat(scala) + .concat('-') + .concat(version) + .concat('-incubating-bin.tar.gz') + } + + function getBinarySigs(scala, version, suffix) { + return 'https://downloads.apache.org/incubator/streampark/' + .concat(version) + .concat('/apache-streampark_') + .concat(scala) + .concat('-') + .concat(version) + .concat('-incubating-bin.tar.gz') + .concat(suffix) + } return ( @@ -46,36 +72,36 @@ export default function (props) {
    {release.version} {release.date} - source + source ( - sha512 + sha512 | - signature + signature ) - + {'apache-streampark_2.12-' + release.version + '-incubating-bin.tar.gz'} ( - + Sign | - + SHA512 )
    - + {'apache-streampark_2.11-' + release.version + '-incubating-bin.tar.gz'} ( - + Sign | - + SHA512 )