diff --git a/docs/get-started/installing-cardano-node.md b/docs/get-started/installing-cardano-node.md index 2695bd8438..5dfae22f79 100644 --- a/docs/get-started/installing-cardano-node.md +++ b/docs/get-started/installing-cardano-node.md @@ -5,17 +5,20 @@ sidebar_label: Installing cardano-node description: This guide shows how to build and install the cardano-node and cardano-cli from the source-code for all major Operating Systems image: ./img/og-developer-portal.png --- +import HydraBuildList from '@site/src/components/docs/HydraBuildList'; -### Overview +### Overview This guide will show you how to compile and install the `cardano-node` and `cardano-cli` into your operating system of choice, directly from the source-code. It will enable you to interact with the **Cardano** blockchain, including but not limited to sending/receiving **transactions**, creating **NFTs**, posting transaction **metadata** into the blockchain, minting/burning **native tokens**, creating a **stake pool**, executing **smart contracts**, and so much more! :::note -If you want to avoid compiling the binaries yourself, You can download the latest pre-built binaries of `cardano-node` and `cardano-cli` from the links below. +If you want to avoid compiling the binaries yourself, you can download the latest versions of `cardano-node` and `cardano-cli` from the links below. -- [Linux](https://hydra.iohk.io/build/6263009) -- [MacOS](https://hydra.iohk.io/build/6263000) -- [Windows](https://hydra.iohk.io/build/6263143) + The components can be built and run on **Windows** and **MacOS**, but we recommend that stake pool operators use **Linux** in production to take advantage of the associated performance advantages. ::: @@ -411,4 +414,4 @@ Next, we will talk about how to [run cardano-node](running-cardano.md). :::important Currently, the **Windows** installation guide is still in progress. In the meantime, we recommend using [WSL (Windows Subsystem for Linux)](https://docs.microsoft.com/en-us/windows/wsl/) to get a Linux environment on top of Windows. Once installed, you can use the [Linux](#linux) guide to install and run `cardano-node` within **WSL**. -::: \ No newline at end of file +::: diff --git a/src/components/docs/HydraBuildList/index.js b/src/components/docs/HydraBuildList/index.js new file mode 100644 index 0000000000..e1ab618e8f --- /dev/null +++ b/src/components/docs/HydraBuildList/index.js @@ -0,0 +1,56 @@ +import React from "react"; + +export const BuildLink = ({ children, id }) => ( + {children} +); + +export const BuildListItem = ({ children, id }) => ( +
  • {children}
  • +); + +class HydraBuildList extends React.Component { + constructor({ latest, linux, macos, win64 }) { + super() + this.state = { + isCurrent: false, + hasErrors: false, + latest: latest, + linux: linux, + macos: macos, + win64: win64 + }; + } + componentDidMount() { + fetch('https://api.github.com/repos/input-output-hk/cardano-node/releases/latest') + .then(resp => resp.json()) + .then(json => json.body.match(/.*Hydra binaries]\((.*)#tabs-constituents\).*/)[1]) + .then(link => { + let isCurrent = link.match(/\d+/) == this.state.latest + this.setState({ ...this.state.isCurrent, isCurrent }) + return link + }) + .then(link => { + let latest = link.match(/\d+.*/) + "#tabs-constituents" + this.setState({ ...this.state.latest, latest }) + }) + .catch(err => { + this.setState({err, hasErrors: true}) + }) + } + render() { + return ( + <> + + {!this.state.isCurrent + ? (

    There are newer binaries available:

    ) : (<>) + } + + ); + } +} + +export default HydraBuildList; \ No newline at end of file