From b30d65b93f9d05d67fa4438d469305bf264dd9b2 Mon Sep 17 00:00:00 2001 From: "Jose M. Valera Reales" Date: Mon, 9 Jun 2025 13:31:17 +0200 Subject: [PATCH] docs: add development guide --- Makefile | 4 ++++ README.md | 24 ++++++++++++++++++++++++ install-dependencies.sh | 4 +++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a7de431..8b2bb41 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ help: @echo " pre_commit/run Function that will be called when the pre-commit hook runs" @echo " sa Run shellcheck static analysis tool" @echo " lint Run editorconfig linter tool" + @echo " deps Install required test dependencies" SRC_SCRIPTS_DIR=src PRE_COMMIT_SCRIPTS_FILE=./bin/pre-commit @@ -71,3 +72,6 @@ ifndef LINTER_CHECKER else @ec -config .editorconfig && printf "\e[1m\e[32m%s\e[0m\n" "editorconfig-check: OK!" endif + +deps: + bash install-dependencies.sh diff --git a/README.md b/README.md index b322b83..4dcd10d 100644 --- a/README.md +++ b/README.md @@ -67,3 +67,27 @@ Downloading 'create-pr' to 'lib'... Downloading 'dumper.sh' to 'src/dev'... > dumper.sh installed successfully in 'src/dev' ``` + +### Development + +Install required dependencies to run the tests: + +```bash +make deps +``` + +Then run the test suite and linters: + +```bash +make test +make sa +make lint +``` + +To enable automatic checks before each commit install the pre-commit hook: + +```bash +make pre_commit/install +``` + +For more details see [CONTRIBUTING](.github/CONTRIBUTING.md). diff --git a/install-dependencies.sh b/install-dependencies.sh index 3a05885..ef74a21 100755 --- a/install-dependencies.sh +++ b/install-dependencies.sh @@ -1,3 +1,5 @@ #!/bin/bash +set -euo pipefail -curl -s https://bashunit.typeddevs.com/install.sh | bash +echo "Installing test dependencies via bashunit installer..." +curl -fsSL https://bashunit.typeddevs.com/install.sh | bash