From e1a1a41f02067c9d35ef820dfa34210ad67c5f64 Mon Sep 17 00:00:00 2001 From: Neville Antony Jose <114400911+najose@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:09:39 +0530 Subject: [PATCH] Update install section in docs (#24) --- docs/docs/index.md | 48 +++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/docs/docs/index.md b/docs/docs/index.md index 706b571..74768d8 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -17,37 +17,18 @@ See [**official Terraform documentation**](https://developer.hashicorp.com/terra !!! info "Install" - === "Build From Source" - - ```shell - # Clone the repo - $ git clone git@github.com:schrodinger/infra-tester.git - - # Build the executable - $ go build -o bin/infra-tester - - # Move the binary to a directory in the $PATH - $ sudo mv infra-tester /usr/local/bin - ``` - - === "Install Latest Linux Release" - + === "Install using Go" ```shell - # Download the latest release binary - $ curl -L https://github.com/schrodinger/infra-tester/releases/latest/download/infra-tester-linux-x86_64 -o infra-tester - - # Make it executable - $ chmod +x infra-tester - - # Move it to a directory in the $PATH - $ sudo mv infra_tester /usr/local/bin + go install github.com/schrodinger/infra-tester@latest ``` - === "Install Latest MacOS Release" + === "Install from GitHub Release - Linux and MacOS" ```shell + PLATFORM=linux + PLATFORM=macos # Download the latest release binary - $ curl -L https://github.com/schrodinger/infra-tester/releases/latest/download/infra-tester-macos-x86_64 -o infra-tester + $ curl -L https://github.com/schrodinger/infra-tester/releases/latest/download/infra-tester-${PLATFORM}-x86_64 -o infra-tester # Make it executable $ chmod +x infra-tester @@ -56,7 +37,7 @@ See [**official Terraform documentation**](https://developer.hashicorp.com/terra $ sudo mv infra-tester /usr/local/bin ``` - === "Install Latest Windows Release" + === "Install from GitHub Release - Windows" 1. Download the latest Windows release binary from the below URL: ``` @@ -65,6 +46,21 @@ See [**official Terraform documentation**](https://developer.hashicorp.com/terra 2. Move it to a directory under `PATH`, or add the directory where you'd like to keep the executable to `PATH`. + === "Build From Source" + + ```shell + # Clone the repo + $ git clone git@github.com:schrodinger/infra-tester.git + + # Build the executable and move the binary to a directory in the $PATH + $ cd infra-tester && go build -o bin/infra-tester + $ sudo mv infra-tester /usr/local/bin + + # OR you may run go install + $ go install + + ``` + #### Writing Your First *infra-tester* Test Configuration The [Writing a Test From Scratch](./writing_tests.md) page provides a simple hands-on