From 73bb5c4fad7d28064180f17e7fe49ecdcd0030d0 Mon Sep 17 00:00:00 2001 From: Reece Williams <31943163+Reecepbcups@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:47:30 +0400 Subject: [PATCH] fix: tab docs, new version (#252) * feat: new tabs * bump: spawn v0.50.10 * link check * minor modify --- README.md | 12 +- .../01-setup/01-system-setup.md | 228 +++++++++--------- .../01-setup/02-install-spawn.md | 2 +- .../09-ibc-cosmwasm.md | 2 +- .../03-demos/04-cw-validator-reviews.md | 2 +- scripts/bump_docs.sh | 4 +- 6 files changed, 127 insertions(+), 123 deletions(-) diff --git a/README.md b/README.md index 61aee17..c402b05 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,13 @@ Spawn is the easiest way to build, maintain and scale a Cosmos SDK blockchain. S If you do not have [`go 1.22+`](https://go.dev/doc/install), [`Docker`](https://docs.docker.com/get-docker/), or [`git`](https://git-scm.com/) installed, follow the instructions below. -* [MacOS](./docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md#macos) -* [Windows](./docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md#windows) -* [Ubuntu](./docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md#linux-ubuntu) +* [MacOS, Windows, and Ubuntu Setup](./docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md) ### Install Spawn ```bash # Download the the Spawn repository -git clone https://github.com/rollchains/spawn.git --depth=1 --branch v0.50.9 +git clone https://github.com/rollchains/spawn.git --depth=1 --branch v0.50.10 cd spawn # Install Spawn @@ -38,11 +36,11 @@ make get-localic # Attempt to run a command spawn help -# Potential workaround if spawn is immediately killed when attempting run "spawn help" on a m* macbook. +# Potential workaround if spawn is immediately killed when attempting run "spawn help" on a m* macbook. # This may happen because of an xcode16 update. -# To work around this as a temporary measure please change this line in the Make file. +# To work around this as a temporary measure please change this line in the Make file. LD_FLAGS = -X main.SpawnVersion=$(VERSION) -# to +# to LD_FLAGS = -X main.SpawnVersion=$(VERSION) -s -w diff --git a/docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md b/docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md index f681d01..3d34662 100644 --- a/docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md +++ b/docs/versioned_docs/version-v0.50.x/01-setup/01-system-setup.md @@ -5,6 +5,8 @@ sidebar_position: 1 slug: /install/system-setup --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; # Overview @@ -22,114 +24,118 @@ Before you can install and interact with spawn, you must have the following core If you do not have these components installed, follow the instructions below to install them. -## Windows - -```bash -# Install WSL in powershell -wsl --install -Restart-Computer - -# Setup WSL Ubuntu Image -wsl.exe --install Ubuntu-24.04 - -# Open wsl instance -wsl - -# update and add snap if not already installed -sudo apt update && sudo apt install snapd - -# Install Go (Snap) -sudo snap install go --channel=1.23/stable --classic - -# Install Base -sudo apt install make gcc git jq wget - -# Install github-cli -sudo snap install gh - -# Install docker -https://docs.docker.com/desktop/wsl/#turn-on-docker-desktop-wsl-2 -# or snap: -sudo snap install docker - -# Fix versioning for interaction of commands -sudo chmod 666 /var/run/docker.sock - -# Setup base git config -git config --global user.email "yourEmail@gmail.com" -git config --global user.name "Your Name" -``` - - -## MacOS - -```bash -# Base -brew install make -brew install gcc -brew install wget -brew install jq - -# Github CLI - https://github.com/cli/cli -brew install gh -gh auth login - -# Golang -brew install go - -# Docker -brew install --cask docker -open -a Docker # start docker desktop -# settings -> General -> Start Docker Desktop when you sign in to your computer -# Apply & Restart - -# Setup base git config -git config --global user.email "yourEmail@gmail.com" -git config --global user.name "Your Name" -``` - - -## Linux (Ubuntu) - -```bash -# Base -sudo apt install make gcc git jq wget - -# (optional) Github CLI - https://github.com/cli/cli -curl -sS https://webi.sh/gh | sh -gh auth login - -# Golang -GO_VERSION=1.23.0 -wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz -sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz - -# Docker -sudo apt -y install docker.io - -# Setup base git config -git config --global user.email "yourEmail@gmail.com" -git config --global user.name "Your Name" -``` - -## CosmWasm - -Some tutorials require CosmWasm (Rust smart contracts) setup. This section is option, unless a tutorial is CosmWasm focused. -CosmWasm requires [Rust](https://www.rust-lang.org/). You must have this installed as the contract will be built locally. - -```bash -# Install rust - https://www.rust-lang.org/tools/install -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - -# Update shell env -source $HOME/.cargo/env - -# or Update if you have it -rustup update - -# Install other dependencies -rustup target add wasm32-unknown-unknown - -cargo install cargo-generate --features vendored-openssl -cargo install cargo-run-script -``` +## Install Dependencies + + + + ```bash + # Base + brew install make + brew install gcc + brew install wget + brew install jq + + # Github CLI - https://github.com/cli/cli + brew install gh + gh auth login + + # Golang + brew install go + + # Docker + brew install --cask docker + open -a Docker # start docker desktop + # settings -> General -> Start Docker Desktop when you sign in to your computer + # Apply & Restart + + # Setup base git config + git config --global user.email "yourEmail@gmail.com" + git config --global user.name "Your Name" + ``` + + + + ```bash + # Install WSL in powershell + wsl --install + Restart-Computer + + # Setup WSL Ubuntu Image + wsl.exe --install Ubuntu-24.04 + + # Open wsl instance + wsl + + # update and add snap if not already installed + sudo apt update && sudo apt install snapd + + # Install Go (Snap) + sudo snap install go --channel=1.23/stable --classic + + # Install Base + sudo apt install make gcc git jq wget + + # Install github-cli + sudo snap install gh + + # Install docker + https://docs.docker.com/desktop/wsl/#turn-on-docker-desktop-wsl-2 + # or snap: + sudo snap install docker + + # Fix versioning for interaction of commands + sudo chmod 666 /var/run/docker.sock + + # Setup base git config + git config --global user.email "yourEmail@gmail.com" + git config --global user.name "Your Name" + ``` + + + + + ```bash + # Base + sudo apt install make gcc git jq wget + + # (optional) Github CLI - https://github.com/cli/cli + curl -sS https://webi.sh/gh | sh + gh auth login + + # Golang + GO_VERSION=1.23.0 + wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz + sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz + + # Docker + sudo apt -y install docker.io + + # Setup base git config + git config --global user.email "yourEmail@gmail.com" + git config --global user.name "Your Name" + ``` + + + + + Some tutorials require CosmWasm (Rust smart contracts) setup. This section is option, unless a tutorial is CosmWasm focused. + + CosmWasm requires [Rust](https://www.rust-lang.org/). You must have this installed as the contract will be built locally. + ```bash + # Install rust - https://www.rust-lang.org/tools/install + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + + # Update shell env + source $HOME/.cargo/env + + # or Update if you have it + rustup update + + # Install other dependencies + rustup target add wasm32-unknown-unknown + + cargo install cargo-generate --features vendored-openssl + cargo install cargo-run-script + ``` + + diff --git a/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md b/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md index 5af6fd9..de15822 100644 --- a/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md +++ b/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md @@ -19,7 +19,7 @@ Install Spawn from source. ```bash # Install from latest source -git clone https://github.com/rollchains/spawn.git --depth 1 --branch v0.50.9 +git clone https://github.com/rollchains/spawn.git --depth 1 --branch v0.50.10 # Change to this directory cd spawn diff --git a/docs/versioned_docs/version-v0.50.x/02-build-your-application/09-ibc-cosmwasm.md b/docs/versioned_docs/version-v0.50.x/02-build-your-application/09-ibc-cosmwasm.md index cd0899b..119585b 100644 --- a/docs/versioned_docs/version-v0.50.x/02-build-your-application/09-ibc-cosmwasm.md +++ b/docs/versioned_docs/version-v0.50.x/02-build-your-application/09-ibc-cosmwasm.md @@ -12,7 +12,7 @@ You will build a new IBC contract with [CosmWasm](https://cosmwasm.com), enablin ## Prerequisites - [System Setup](../01-setup/01-system-setup.md) - [Install Spawn](../01-setup/02-install-spawn.md) -- [Rust + CosmWasm](../01-setup/01-system-setup.md#cosmwasm) +- [Rust + CosmWasm](../01-setup/01-system-setup.md) ## Setup the Chain diff --git a/docs/versioned_docs/version-v0.50.x/03-demos/04-cw-validator-reviews.md b/docs/versioned_docs/version-v0.50.x/03-demos/04-cw-validator-reviews.md index 39b9ec1..75bce80 100644 --- a/docs/versioned_docs/version-v0.50.x/03-demos/04-cw-validator-reviews.md +++ b/docs/versioned_docs/version-v0.50.x/03-demos/04-cw-validator-reviews.md @@ -13,7 +13,7 @@ There are easy ways to get validators in a cosmwasm smart contract. The goal of ## Prerequisites - [System Setup](../01-setup/01-system-setup.md) - [Install Spawn](../01-setup/02-install-spawn.md) -- [Rust + CosmWasm](../01-setup/01-system-setup.md#cosmwasm) +- [Rust + CosmWasm](../01-setup/01-system-setup.md) ## Setup the Chain diff --git a/scripts/bump_docs.sh b/scripts/bump_docs.sh index 9164be3..5b79594 100644 --- a/scripts/bump_docs.sh +++ b/scripts/bump_docs.sh @@ -1,7 +1,7 @@ # bumps docs versions for spawn -OLD_VERSION=v0.50.8 -NEW_VERSION=v0.50.9 +OLD_VERSION=v0.50.9 +NEW_VERSION=v0.50.10 findAndReplace() { find . -type f -name "$1" -not -path "*node_modules*" -exec sed -i "$2" {} \;