2020-04-06 20:27:35 +00:00
|
|
|
import VERSION from '../../data/version.js'
|
|
|
|
import ProductDownloader from '@hashicorp/react-product-downloader'
|
|
|
|
import Head from 'next/head'
|
|
|
|
import HashiHead from '@hashicorp/react-head'
|
|
|
|
|
2020-06-12 00:58:05 +00:00
|
|
|
export default function DownloadsPage({ releaseData }) {
|
2020-04-06 20:27:35 +00:00
|
|
|
return (
|
|
|
|
<div id="p-downloads" className="g-container">
|
|
|
|
<HashiHead is={Head} title="Downloads | Consul by HashiCorp" />
|
|
|
|
<ProductDownloader
|
|
|
|
product="Consul"
|
|
|
|
version={VERSION}
|
2020-06-12 00:58:05 +00:00
|
|
|
releaseData={releaseData}
|
2020-10-13 21:33:49 +00:00
|
|
|
prerelease={{
|
|
|
|
type: 'beta', // the type of prerelease: beta, release candidate, etc.
|
|
|
|
name: 'v1.9.0', // the name displayed in text on the website
|
|
|
|
version: '1.9.0-beta1', // the actual version tag that was pushed to releases.hashicorp.com
|
|
|
|
}}
|
2020-04-13 22:36:31 +00:00
|
|
|
>
|
|
|
|
<p>
|
2020-09-01 15:14:13 +00:00
|
|
|
<a href="/docs/download-tools">» Download Consul Tools</a>
|
2020-04-13 22:36:31 +00:00
|
|
|
</p>
|
|
|
|
<div className="release-candidate">
|
|
|
|
<p>Note for ARM users:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Use Armelv5 for all 32-bit armel systems</li>
|
|
|
|
<li>Use Armhfv6 for all armhf systems with v6+ architecture</li>
|
|
|
|
<li>Use Arm64 for all v8 64-bit architectures</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
The following commands can help determine the right version for your
|
|
|
|
system:
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<code>$ uname -m</code>
|
|
|
|
<br />
|
|
|
|
<code>
|
|
|
|
$ readelf -a /proc/self/exe | grep -q -c Tag_ABI_VFP_args && echo
|
|
|
|
"armhf" || echo "armel"
|
|
|
|
</code>
|
|
|
|
</div>
|
|
|
|
</ProductDownloader>
|
2020-04-06 20:27:35 +00:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function getStaticProps() {
|
|
|
|
return fetch(`https://releases.hashicorp.com/consul/${VERSION}/index.json`)
|
2020-06-12 00:58:05 +00:00
|
|
|
.then((res) => res.json())
|
|
|
|
.then((releaseData) => ({ props: { releaseData } }))
|
2020-04-06 20:27:35 +00:00
|
|
|
.catch(() => {
|
|
|
|
throw new Error(
|
|
|
|
`--------------------------------------------------------
|
|
|
|
Unable to resolve version ${VERSION} on releases.hashicorp.com from link
|
|
|
|
<https://releases.hashicorp.com/consul/${VERSION}/index.json>. Usually this
|
|
|
|
means that the specified version has not yet been released. The downloads page
|
|
|
|
version can only be updated after the new version has been released, to ensure
|
|
|
|
that it works for all users.
|
|
|
|
----------------------------------------------------------`
|
|
|
|
)
|
|
|
|
})
|
|
|
|
}
|