From e5499c52041ecbabbced2b642de5404c0898503f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Palet?= Date: Mon, 5 Feb 2024 10:28:35 +0000 Subject: [PATCH] Add pre-requisites in developer guide --- CONTRIBUTION.md | 13 +++++++++---- scripts/project.sh | 9 --------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index 434e4d54f..f6462d6b3 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -10,6 +10,11 @@ Your contribution is welcome! Thank you for your interest in contributing to the ## Developer Guide +Prerequisites: + +- [`Go`](https://go.dev/doc/install) 1.21+ +- [`yamllint`](https://yamllint.readthedocs.io/en/stable/quickstart.html) + ### Repository structure The CLI commands are located under `internal/cmd`, where each folder includes the source code for a `group` of commands. Inside `pkg` you can find several useful packages that are shared by the commands and provide additional functionality such as `flags`, `globalflags`, `tables`, etc. @@ -23,9 +28,9 @@ Check the [Authentication](README.md#authentication) section on the README. These commands can be executed from the project root: - `make project-tools`: install the required dependencies -- `make build`: compiles the CLI and saves the binary under _./bin/stackit_ -- `make lint`: lint the code and examples -- `make generate-docs`: generates Markdown documentation for every command +- `make build`: compile the CLI and save the binary under _./bin/stackit_ +- `make lint`: lint the code +- `make generate-docs`: generate Markdown documentation for every command - `make test`: run unit tests #### Local development @@ -54,7 +59,7 @@ To test your changes, you can either: To make your contribution, follow these steps: -1. Check open or recently closed [Pull Requests](https://github.com/stackitcloud/stackit-cli/pulls) and [Issues](https://github.com/stackitcloud/stackit-cli/issues)to make sure the contribution you are making has not been already tackled by someone else. +1. Check open or recently closed [Pull Requests](https://github.com/stackitcloud/stackit-cli/pulls) and [Issues](https://github.com/stackitcloud/stackit-cli/issues) to make sure the contribution you are making has not been already tackled by someone else. 2. Fork the repo. 3. Make your changes in a branch that is up-to-date with the original repo's `main` branch. 4. Commit your changes including a descriptive message diff --git a/scripts/project.sh b/scripts/project.sh index 4e36e4aae..fd15c32e6 100755 --- a/scripts/project.sh +++ b/scripts/project.sh @@ -13,17 +13,8 @@ if [ "$action" = "help" ]; then [ -f "$0".man ] && man "$0".man || echo "No help, please read the script in ${script}, we will add help later" elif [ "$action" = "tools" ]; then cd ${ROOT_DIR} - go mod download go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2 - - PIP_COMMAND="pip" - if ! command -v yamllint &>/dev/null; then - if command -v pip3 &>/dev/null; then - PIP_COMMAND="pip3" - fi - $PIP_COMMAND install yamllint - fi else echo "Invalid action: '$action', please use $0 help for help" fi