mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-20 02:11:40 +01:00
139 lines
4.6 KiB
JavaScript
139 lines
4.6 KiB
JavaScript
/**
|
|
* Copyright (c) 2017-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
const React = require("react");
|
|
|
|
const CompLibrary = require("../../core/CompLibrary");
|
|
|
|
const Container = CompLibrary.Container;
|
|
|
|
const CWD = process.cwd();
|
|
|
|
const versions = require(`${CWD}/versions.json`);
|
|
|
|
function Versions(props) {
|
|
const { config: siteConfig } = props;
|
|
const latestVersion = versions[0];
|
|
const repoUrl = `https://github.com/${siteConfig.organizationName}/${
|
|
siteConfig.projectName
|
|
}`;
|
|
|
|
const defaultDoc = "core/core-intro";
|
|
|
|
return (
|
|
<div className="docMainWrapper wrapper">
|
|
<Container className="mainContainer versionsContainer">
|
|
<div className="post">
|
|
<header className="postHeader">
|
|
<h1>{siteConfig.title} Versions</h1>
|
|
</header>
|
|
<p>New versions of this project are released every so often.</p>
|
|
<h3 id="latest">Current version (Stable)</h3>
|
|
<CompLibrary.MarkdownBlock>
|
|
> Note that until Bitcoin-S reaches version 1.0.0 it does **_not_**
|
|
follow [semantic versioning](https://semver.org/)
|
|
</CompLibrary.MarkdownBlock>
|
|
<table className="versions">
|
|
<tbody>
|
|
<tr>
|
|
<th>{latestVersion}</th>
|
|
<td>
|
|
{/* You are supposed to change this href where appropriate
|
|
Example: href="<baseUrl>/docs(/:language)/:id" */}
|
|
<a
|
|
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
|
|
props.language ? props.language + "/" : ""
|
|
}${defaultDoc}`}
|
|
>
|
|
Documentation
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href={siteConfig.scaladocUrl}>Scaladoc</a>
|
|
</td>
|
|
<td>
|
|
<a href={`${repoUrl}/releases/tag/v${latestVersion}`}>
|
|
Release Notes
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
This is the version that is downloaded automatically if you don't
|
|
specify a version number.
|
|
</p>
|
|
<h3 id="rc">Pre-release versions</h3>
|
|
<table className="versions">
|
|
<tbody>
|
|
<tr>
|
|
<th>master</th>
|
|
<td>
|
|
<a
|
|
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
|
|
props.language ? props.language + "/" : ""
|
|
}next/${defaultDoc}`}
|
|
>
|
|
Documentation
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href={repoUrl}>Source Code</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
If you want to live dangerously, all merges into master are
|
|
published as snapshots on{" "}
|
|
<a href="https://oss.sonatype.org/content/repositories/snapshots/org/bitcoin-s/">
|
|
Sonatype
|
|
</a>
|
|
.
|
|
</p>
|
|
<h3 id="archive">Past Versions</h3>
|
|
<p>Here you can find previous versions of the documentation.</p>
|
|
<table className="versions">
|
|
<tbody>
|
|
{versions.map(
|
|
version =>
|
|
version !== latestVersion && (
|
|
<tr>
|
|
<th>{version}</th>
|
|
<td>
|
|
{/* You are supposed to change this href where appropriate
|
|
Example: href="<baseUrl>/docs(/:language)/:version/:id" */}
|
|
<a
|
|
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
|
|
props.language ? props.language + "/" : ""
|
|
}${version}/${defaultDoc}`}
|
|
>
|
|
Documentation
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{/* TODO: fix this URL */}
|
|
<a href={siteConfig.scaladocUrl}>Scaladoc</a>
|
|
</td>
|
|
<td>
|
|
<a href={`${repoUrl}/releases/tag/v${version}`}>
|
|
Release Notes
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
)
|
|
)}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</Container>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
module.exports = Versions;
|