|
|
|
@ -1,22 +1,100 @@ |
|
|
|
|
import { Code, Link, ListItem, Stack, Text, UnorderedList } from '@chakra-ui/react'; |
|
|
|
|
import type { NextPage } from 'next'; |
|
|
|
|
import { Center, Code, Flex, Link, ListItem, Stack, Text, UnorderedList } from '@chakra-ui/react'; |
|
|
|
|
import type { GetServerSideProps, NextPage } from 'next'; |
|
|
|
|
import { useState } from 'react'; |
|
|
|
|
|
|
|
|
|
import { DownloadsHero, DownloadsSection, DownloadsTable } from '../components/UI/downloads'; |
|
|
|
|
import { |
|
|
|
|
DownloadsHero, |
|
|
|
|
DownloadsSection, |
|
|
|
|
DownloadsTable, |
|
|
|
|
SpecificVersionsSection |
|
|
|
|
} from '../components/UI/downloads'; |
|
|
|
|
import { DataTable } from '../components/UI'; |
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
ALL_GETH_COMMITS_URL, |
|
|
|
|
DEFAULT_BUILD_AMOUNT_TO_SHOW, |
|
|
|
|
DOWNLOAD_OPENPGP_BUILD_HEADERS, |
|
|
|
|
DOWNLOAD_OPENPGP_DEVELOPER_HEADERS, |
|
|
|
|
GETH_REPO_URL |
|
|
|
|
GETH_REPO_URL, |
|
|
|
|
LATEST_GETH_RELEASE_URL, |
|
|
|
|
LATEST_SOURCES_BASE_URL, |
|
|
|
|
LINUX_BINARY_BASE_URL, |
|
|
|
|
MACOS_BINARY_BASE_URL, |
|
|
|
|
RELEASE_NOTES_BASE_URL, |
|
|
|
|
WINDOWS_BINARY_BASE_URL |
|
|
|
|
} from '../constants'; |
|
|
|
|
|
|
|
|
|
import { testDownloadData } from '../data/test/download-testdata'; |
|
|
|
|
import { pgpBuildTestData } from '../data/test/pgpbuild-testdata'; |
|
|
|
|
import { pgpDeveloperTestData } from '../data/test/pgpdeveloper-testdata'; |
|
|
|
|
|
|
|
|
|
const DownloadsPage: NextPage = () => { |
|
|
|
|
export const getServerSideProps: GetServerSideProps = async () => { |
|
|
|
|
// Latest release name & version number
|
|
|
|
|
const { versionNumber, releaseName } = await fetch(LATEST_GETH_RELEASE_URL) |
|
|
|
|
.then(response => response.json()) |
|
|
|
|
.then(release => { |
|
|
|
|
return { |
|
|
|
|
versionNumber: release.tag_name, |
|
|
|
|
releaseName: release.name |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
// Latest release commit hash
|
|
|
|
|
const commit = await fetch(`${ALL_GETH_COMMITS_URL}/${versionNumber}`) |
|
|
|
|
.then(response => response.json()) |
|
|
|
|
.then(commit => commit.sha.slice(0, 8)); |
|
|
|
|
|
|
|
|
|
// Latest binaries urls
|
|
|
|
|
const LATEST_LINUX_BINARY_URL = `${LINUX_BINARY_BASE_URL}${versionNumber.slice( |
|
|
|
|
1 |
|
|
|
|
)}-${commit}.tar.gz`;
|
|
|
|
|
const LATEST_MACOS_BINARY_URL = `${MACOS_BINARY_BASE_URL}${versionNumber.slice( |
|
|
|
|
1 |
|
|
|
|
)}-${commit}.tar.gz`;
|
|
|
|
|
const LATEST_WINDOWS_BINARY_URL = `${WINDOWS_BINARY_BASE_URL}${versionNumber.slice( |
|
|
|
|
1 |
|
|
|
|
)}-${commit}.exe`;
|
|
|
|
|
|
|
|
|
|
// Sources urls
|
|
|
|
|
const LATEST_SOURCES_URL = `${LATEST_SOURCES_BASE_URL}${versionNumber}.tar.gz`; |
|
|
|
|
const RELEASE_NOTES_URL = `${RELEASE_NOTES_BASE_URL}${versionNumber}`; |
|
|
|
|
|
|
|
|
|
const LATEST_RELEASES_DATA = { |
|
|
|
|
versionNumber, |
|
|
|
|
releaseName, |
|
|
|
|
urls: { |
|
|
|
|
LATEST_LINUX_BINARY_URL, |
|
|
|
|
LATEST_MACOS_BINARY_URL, |
|
|
|
|
LATEST_WINDOWS_BINARY_URL, |
|
|
|
|
LATEST_SOURCES_URL, |
|
|
|
|
RELEASE_NOTES_URL |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
props: { |
|
|
|
|
data: { LATEST_RELEASES_DATA } |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
|
data: { |
|
|
|
|
// TODO: define interfaces after adding the rest of the logic
|
|
|
|
|
LATEST_RELEASES_DATA: { |
|
|
|
|
versionNumber: string; |
|
|
|
|
releaseName: string; |
|
|
|
|
urls: { |
|
|
|
|
LATEST_LINUX_BINARY_URL: string; |
|
|
|
|
LATEST_MACOS_BINARY_URL: string; |
|
|
|
|
LATEST_WINDOWS_BINARY_URL: string; |
|
|
|
|
LATEST_SOURCES_URL: string; |
|
|
|
|
RELEASE_NOTES_URL: string; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const DownloadsPage: NextPage<Props> = ({ data }) => { |
|
|
|
|
const [amountStableReleases, updateAmountStables] = useState(DEFAULT_BUILD_AMOUNT_TO_SHOW); |
|
|
|
|
const [amountDevelopBuilds, updateAmountDevelopBuilds] = useState(DEFAULT_BUILD_AMOUNT_TO_SHOW); |
|
|
|
|
|
|
|
|
@ -28,35 +106,27 @@ const DownloadsPage: NextPage = () => { |
|
|
|
|
updateAmountDevelopBuilds(amountDevelopBuilds + 10); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const { |
|
|
|
|
LATEST_RELEASES_DATA: { releaseName, versionNumber, urls } |
|
|
|
|
} = data; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
{/* TODO: add PageMetadata */} |
|
|
|
|
|
|
|
|
|
<main> |
|
|
|
|
<Stack spacing={4}> |
|
|
|
|
{/* TODO: replace hardcoded strings with build information */} |
|
|
|
|
<DownloadsHero |
|
|
|
|
currentBuildName={'Sentry Omega'} |
|
|
|
|
currentBuildVersion={'v1.10.23'} |
|
|
|
|
linuxBuildURL={ |
|
|
|
|
'https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.25-69568c55.tar.gz' |
|
|
|
|
} |
|
|
|
|
macOSBuildURL={ |
|
|
|
|
'https://gethstore.blob.core.windows.net/builds/geth-darwin-amd64-1.10.25-69568c55.tar.gz' |
|
|
|
|
} |
|
|
|
|
releaseNotesURL={''} |
|
|
|
|
sourceCodeURL={'https://github.com/ethereum/go-ethereum/archive/v1.10.25.tar.gz'} |
|
|
|
|
windowsBuildURL={ |
|
|
|
|
'https://gethstore.blob.core.windows.net/builds/geth-windows-amd64-1.10.25-69568c55.exe' |
|
|
|
|
} |
|
|
|
|
currentBuild={releaseName} |
|
|
|
|
currentBuildVersion={versionNumber} |
|
|
|
|
linuxBuildURL={urls.LATEST_LINUX_BINARY_URL} |
|
|
|
|
macOSBuildURL={urls.LATEST_MACOS_BINARY_URL} |
|
|
|
|
windowsBuildURL={urls.LATEST_WINDOWS_BINARY_URL} |
|
|
|
|
sourceCodeURL={urls.LATEST_SOURCES_URL} |
|
|
|
|
releaseNotesURL={urls.RELEASE_NOTES_URL} |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<DownloadsSection |
|
|
|
|
imgSrc='/images/pages/gopher-home-side-desktop.svg' |
|
|
|
|
imgAltText='Gopher facing right' |
|
|
|
|
sectionTitle='Specific Versions' |
|
|
|
|
id='specificversions' |
|
|
|
|
> |
|
|
|
|
<SpecificVersionsSection> |
|
|
|
|
<Stack p={4}> |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
If you're looking for a specific release, operating system or architecture, |
|
|
|
@ -92,10 +162,11 @@ const DownloadsPage: NextPage = () => { |
|
|
|
|
Signatures for details). |
|
|
|
|
</Text> |
|
|
|
|
</Stack> |
|
|
|
|
</DownloadsSection> |
|
|
|
|
</SpecificVersionsSection> |
|
|
|
|
|
|
|
|
|
<DownloadsSection sectionTitle='Stable releases' id='stablereleases'> |
|
|
|
|
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'> |
|
|
|
|
<DownloadsSection |
|
|
|
|
id='stablereleases' |
|
|
|
|
sectionDescription={ |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
These are the current and previous stable releases of go-ethereum, updated |
|
|
|
|
automatically when a new version is tagged in our{' '} |
|
|
|
@ -103,28 +174,48 @@ const DownloadsPage: NextPage = () => { |
|
|
|
|
GitHub repository. |
|
|
|
|
</Link> |
|
|
|
|
</Text> |
|
|
|
|
</Stack> |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
sectionTitle='Stable releases' |
|
|
|
|
> |
|
|
|
|
{/* TODO: swap test data for real data */} |
|
|
|
|
<DownloadsTable data={testDownloadData.slice(0, amountStableReleases)} /> |
|
|
|
|
|
|
|
|
|
<Stack sx={{ mt: '0 !important' }}> |
|
|
|
|
<Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}> |
|
|
|
|
<Text |
|
|
|
|
fontFamily='"JetBrains Mono", monospace' |
|
|
|
|
fontWeight={700} |
|
|
|
|
textTransform='uppercase' |
|
|
|
|
textAlign='center' |
|
|
|
|
p={4} |
|
|
|
|
> |
|
|
|
|
Show older releases |
|
|
|
|
</Text> |
|
|
|
|
</Link> |
|
|
|
|
</Stack> |
|
|
|
|
<Flex |
|
|
|
|
sx={{ mt: '0 !important' }} |
|
|
|
|
flexDirection={{ base: 'column', md: 'row' }} |
|
|
|
|
justifyContent='space-between' |
|
|
|
|
> |
|
|
|
|
<Stack p={4} display={{ base: 'none', md: 'block' }}> |
|
|
|
|
<Center> |
|
|
|
|
{/* TODO: swap testDownloadData with actual data */} |
|
|
|
|
<Text> |
|
|
|
|
Showing {amountStableReleases} latest releases of a total{' '} |
|
|
|
|
{testDownloadData.length} releases |
|
|
|
|
</Text> |
|
|
|
|
</Center> |
|
|
|
|
</Stack> |
|
|
|
|
<Stack |
|
|
|
|
sx={{ mt: '0 !important' }} |
|
|
|
|
borderLeft={{ base: 'none', md: '2px solid #11866f' }} |
|
|
|
|
> |
|
|
|
|
<Link as='button' variant='button-link-secondary' onClick={showMoreStableReleases}> |
|
|
|
|
<Text |
|
|
|
|
fontFamily='"JetBrains Mono", monospace' |
|
|
|
|
fontWeight={700} |
|
|
|
|
textTransform='uppercase' |
|
|
|
|
textAlign='center' |
|
|
|
|
p={4} |
|
|
|
|
> |
|
|
|
|
Show older releases |
|
|
|
|
</Text> |
|
|
|
|
</Link> |
|
|
|
|
</Stack> |
|
|
|
|
</Flex> |
|
|
|
|
</DownloadsSection> |
|
|
|
|
|
|
|
|
|
<DownloadsSection sectionTitle='Develop builds' id='developbuilds'> |
|
|
|
|
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'> |
|
|
|
|
<DownloadsSection |
|
|
|
|
id='developbuilds' |
|
|
|
|
sectionDescription={ |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
These are the develop snapshots of go-ethereum, updated automatically when a new |
|
|
|
|
commit is pushed into our{' '} |
|
|
|
@ -132,33 +223,54 @@ const DownloadsPage: NextPage = () => { |
|
|
|
|
GitHub repository. |
|
|
|
|
</Link> |
|
|
|
|
</Text> |
|
|
|
|
</Stack> |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
sectionTitle='Develop builds' |
|
|
|
|
> |
|
|
|
|
{/* TODO: swap for real data */} |
|
|
|
|
<DownloadsTable data={testDownloadData.slice(0, amountDevelopBuilds)} /> |
|
|
|
|
|
|
|
|
|
<Stack sx={{ mt: '0 !important' }}> |
|
|
|
|
<Link as='button' variant='button-link-secondary' onClick={showMoreDevelopBuilds}> |
|
|
|
|
<Text |
|
|
|
|
fontFamily='"JetBrains Mono", monospace' |
|
|
|
|
fontWeight={700} |
|
|
|
|
textTransform='uppercase' |
|
|
|
|
textAlign='center' |
|
|
|
|
p={4} |
|
|
|
|
> |
|
|
|
|
Show older releases |
|
|
|
|
</Text> |
|
|
|
|
</Link> |
|
|
|
|
</Stack> |
|
|
|
|
<Flex |
|
|
|
|
sx={{ mt: '0 !important' }} |
|
|
|
|
flexDirection={{ base: 'column', md: 'row' }} |
|
|
|
|
justifyContent='space-between' |
|
|
|
|
> |
|
|
|
|
<Stack p={4} display={{ base: 'none', md: 'block' }}> |
|
|
|
|
<Center> |
|
|
|
|
{/* TODO: swap testDownloadData with actual data */} |
|
|
|
|
<Text> |
|
|
|
|
Showing {amountDevelopBuilds} latest releases of a total{' '} |
|
|
|
|
{testDownloadData.length} releases |
|
|
|
|
</Text> |
|
|
|
|
</Center> |
|
|
|
|
</Stack> |
|
|
|
|
<Stack |
|
|
|
|
sx={{ mt: '0 !important' }} |
|
|
|
|
borderLeft={{ base: 'none', md: '2px solid #11866f' }} |
|
|
|
|
> |
|
|
|
|
<Link as='button' variant='button-link-secondary' onClick={showMoreDevelopBuilds}> |
|
|
|
|
<Text |
|
|
|
|
fontFamily='"JetBrains Mono", monospace' |
|
|
|
|
fontWeight={700} |
|
|
|
|
textTransform='uppercase' |
|
|
|
|
textAlign='center' |
|
|
|
|
p={4} |
|
|
|
|
> |
|
|
|
|
Show older releases |
|
|
|
|
</Text> |
|
|
|
|
</Link> |
|
|
|
|
</Stack> |
|
|
|
|
</Flex> |
|
|
|
|
</DownloadsSection> |
|
|
|
|
|
|
|
|
|
<DownloadsSection sectionTitle='OpenPGP Signatures' id='pgpsignatures'> |
|
|
|
|
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'> |
|
|
|
|
<DownloadsSection |
|
|
|
|
id='pgpsignatures' |
|
|
|
|
sectionDescription={ |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
All the binaries available from this page are signed via our build server PGP keys: |
|
|
|
|
</Text> |
|
|
|
|
</Stack> |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
sectionTitle='OpenPGP Signatures' |
|
|
|
|
> |
|
|
|
|
{/* TODO: swap for real data */} |
|
|
|
|
<Stack borderBottom='2px solid' borderColor='brand.light.primary'> |
|
|
|
|
<DataTable columnHeaders={DOWNLOAD_OPENPGP_BUILD_HEADERS} data={pgpBuildTestData} /> |
|
|
|
@ -173,37 +285,67 @@ const DownloadsPage: NextPage = () => { |
|
|
|
|
</Stack> |
|
|
|
|
</DownloadsSection> |
|
|
|
|
|
|
|
|
|
<DownloadsSection sectionTitle='Importing keys and verifying builds' id='importingkeys'> |
|
|
|
|
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'> |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
You can import the build server public keys by grabbing the individual keys directly |
|
|
|
|
from the keyserver network: |
|
|
|
|
</Text> |
|
|
|
|
<DownloadsSection id='importingkeys' sectionTitle='Importing keys and verifying builds'> |
|
|
|
|
<Flex |
|
|
|
|
p={4} |
|
|
|
|
borderBottom='2px solid' |
|
|
|
|
borderColor='brand.light.primary' |
|
|
|
|
gap={4} |
|
|
|
|
flexDirection={{ base: 'column', md: 'row' }} |
|
|
|
|
> |
|
|
|
|
<Stack flex={1}> |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
You can import the build server public keys by grabbing the individual keys |
|
|
|
|
directly from the keyserver network: |
|
|
|
|
</Text> |
|
|
|
|
</Stack> |
|
|
|
|
|
|
|
|
|
{/* TODO: These keys depends on the binary */} |
|
|
|
|
<Code p={4}>gpg --recv-keys F9585DE6 C2FF8BBF 9BA28146 7B9E2481 D2A67EAC</Code> |
|
|
|
|
</Stack> |
|
|
|
|
<Stack flex={1} w={'100%'}> |
|
|
|
|
{/* TODO: These keys depends on the binary */} |
|
|
|
|
<Code p={4}>gpg --recv-keys F9585DE6 C2FF8BBF 9BA28146 7B9E2481 D2A67EAC</Code> |
|
|
|
|
</Stack> |
|
|
|
|
</Flex> |
|
|
|
|
|
|
|
|
|
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'> |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
Similarly you can import all the developer public keys by grabbing them directly |
|
|
|
|
from the keyserver network: |
|
|
|
|
</Text> |
|
|
|
|
<Flex |
|
|
|
|
p={4} |
|
|
|
|
borderBottom='2px solid' |
|
|
|
|
borderColor='brand.light.primary' |
|
|
|
|
gap={4} |
|
|
|
|
flexDirection={{ base: 'column', md: 'row' }} |
|
|
|
|
> |
|
|
|
|
<Stack flex={1}> |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
Similarly you can import all the developer public keys by grabbing them directly |
|
|
|
|
from the keyserver network: |
|
|
|
|
</Text> |
|
|
|
|
</Stack> |
|
|
|
|
|
|
|
|
|
{/* TODO: These are developer keys, do we need to change? */} |
|
|
|
|
<Code p={4}>gpg --recv-keys E058A81C 05A5DDF0 1CCB7DD2</Code> |
|
|
|
|
</Stack> |
|
|
|
|
<Stack flex={1} w={'100%'}> |
|
|
|
|
{/* TODO: These are developer keys, do we need to change? */} |
|
|
|
|
<Code p={4}>gpg --recv-keys E058A81C 05A5DDF0 1CCB7DD2</Code> |
|
|
|
|
</Stack> |
|
|
|
|
</Flex> |
|
|
|
|
|
|
|
|
|
<Stack p={4}> |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
From the download listings above you should see a link both to the downloadable |
|
|
|
|
archives as well as detached signature files. To verify the authenticity of any |
|
|
|
|
downloaded data, grab both files and then run: |
|
|
|
|
</Text> |
|
|
|
|
<Flex |
|
|
|
|
p={4} |
|
|
|
|
borderBottom='2px solid' |
|
|
|
|
borderColor='brand.light.primary' |
|
|
|
|
gap={4} |
|
|
|
|
flexDirection={{ base: 'column', md: 'row' }} |
|
|
|
|
> |
|
|
|
|
<Stack flex={1}> |
|
|
|
|
<Text textStyle='quick-link-text'> |
|
|
|
|
From the download listings above you should see a link both to the downloadable |
|
|
|
|
archives as well as detached signature files. To verify the authenticity of any |
|
|
|
|
downloaded data, grab both files and then run: |
|
|
|
|
</Text> |
|
|
|
|
</Stack> |
|
|
|
|
|
|
|
|
|
{/* TODO: These keys depends on the binary */} |
|
|
|
|
<Code p={4}>gpg --verify geth-linux-amd64-1.5.0-d0c820ac.tar.gz.asc</Code> |
|
|
|
|
</Stack> |
|
|
|
|
<Stack flex={1} w={'100%'}> |
|
|
|
|
{/* TODO: These keys depends on the binary */} |
|
|
|
|
<Code p={4}>gpg --verify geth-linux-amd64-1.5.0-d0c820ac.tar.gz.asc</Code> |
|
|
|
|
</Stack> |
|
|
|
|
</Flex> |
|
|
|
|
</DownloadsSection> |
|
|
|
|
</Stack> |
|
|
|
|
</main> |
|
|
|
|