From dd73be7860119fa515dbc2deba7eb9969561d5bc Mon Sep 17 00:00:00 2001 From: Hollow Man Date: Thu, 18 May 2023 13:53:45 +0300 Subject: [PATCH] Add minimum build instructions --- Building.md | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/Building.md b/Building.md index 3050820..cd9126d 100644 --- a/Building.md +++ b/Building.md @@ -3,6 +3,7 @@ 1. Setup [Golang compiling environment](https://go.dev/doc/install) (Golang ≥ 1.19) 2. Setup [Git](https://git-scm.com/downloads) 3. Clone this repository + ```bash git clone https://github.com/kubescape/kubescape cd kubescape @@ -10,14 +11,33 @@ cd kubescape ## Build on Windows +### Minimum build + +1. Install MSYS2 _(needed only for the first time)_ + + ``` + build.bat install + ``` + +2. Build kubescape + + ``` + go build -tags=static . + ``` + +### With git enabled + +> **Note** +> For performance reasons it's better to build with this dependency when **scanning git repos**. + 1. Install MSYS2 & build libgit _(needed only for the first time)_ + > **Note** + > You can install MSYS2 separately by running `build.bat install` and build libgit2 separately by running `build.bat build` ``` build.bat all ``` -> **Note** -> You can install MSYS2 separately by running `build.bat install` and build libgit2 separately by running `build.bat build` 2. Build kubescape @@ -25,20 +45,24 @@ cd kubescape make build ``` - OR +## Build on Linux/MacOS + +### Minimum build + +1. Build kubescape ``` go build -tags=static . ``` - -## Build on Linux/MacOS +### With git enabled 1. Install libgit2 dependency _(needed only for the first time)_ - > **Note**: - > `cmake` and `pkg-config` is required to build libgit2. You can install it by running `sudo apt-get install cmake pkg-config` (Linux) or `brew install cmake pkg-config` (macOS). + > **Note** + > 1. For performance reasons it's better to build with this dependency when **scanning git repos**. + > 2. `cmake` and `pkg-config` is required to build libgit2. You can install it by running `sudo apt-get install cmake pkg-config` (Linux) or `brew install cmake pkg-config` (macOS). - ```bash + ``` make libgit2 ``` @@ -48,12 +72,6 @@ cd kubescape make build ``` - OR - - ``` - go build -tags=static . - ``` - 3. Test ```