diff --git a/.tool-versions b/.tool-versions index f73cf3b5..bc11085f 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,9 +1,9 @@ # This file is for you! Please, updated to the versions agreed by your team. -python 3.13.8 terraform 1.7.0 pre-commit 4.3.0 vale 3.6.0 +python 3.13.7 # gitleaks 8.18.4 # ============================================================================== diff --git a/README.md b/README.md index b96a505b..25c8e4d2 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,42 @@ The following software packages, or their equivalents, are expected to be instal - [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/), - [GNU make](https://www.gnu.org/software/make/) 3.82 or later +- [asdf](https://asdf-vm.com/) version manager for managing tool versions (ensure asdf is configured in your shell) ## Setup -To setup the pre commit hooks run +1. Copy the environment file: -```shell -make config -``` + ```shell + cp .env.example .env + ``` + +1. Setup the pre-commit hooks and install dependencies: + + ```shell + make config + ``` + + Note: If you encounter Python installation issues on macOS, you may need to install Python with SSL flags: + + ```shell + CFLAGS="-I$(brew --prefix openssl@3)/include" \ + LDFLAGS="-L$(brew --prefix openssl@3)/lib" \ + PKG_CONFIG_PATH="$(brew --prefix openssl@3)/lib/pkgconfig" \ + asdf install python 3.13.7 + ``` ## Running the app locally The project runs locally inside docker. Please ensure you have docker installed. -You can run the application by running: +Apply the database migrations: + +```shell +make dev-migrate +``` + +Run the application: ```shell make dev-run diff --git a/scripts/init.mk b/scripts/init.mk index 373f8a4f..32093930 100644 --- a/scripts/init.mk +++ b/scripts/init.mk @@ -43,11 +43,11 @@ githooks-run: # Run git hooks configured in this repository @Operations _install-dependency: # Install asdf dependency - mandatory: name=[listed in the '.tool-versions' file]; optional: version=[if not listed] echo ${name} asdf plugin add ${name} ||: - asdf install ${name} $(or ${version},) + asdf install ${name} ${version} _install-dependencies: # Install all the dependencies listed in .tool-versions - for plugin in $$(grep ^[a-z] .tool-versions | sed 's/[[:space:]].*//'); do - make _install-dependency name="$${plugin}" + for plugin in $$(grep ^[a-z] .tool-versions | sed 's/[[:space:]].*//'); do \ + make _install-dependency name="$${plugin}"; \ done clean:: # Remove all generated and temporary files (common) @Operations diff --git a/scripts/tests/test.mk b/scripts/tests/test.mk index aab47c62..37d8f25f 100644 --- a/scripts/tests/test.mk +++ b/scripts/tests/test.mk @@ -65,12 +65,12 @@ test: # Run all the test tasks @Testing test-load _test: - set -e - script="./scripts/tests/${name}.sh" - if [ -e "$${script}" ]; then - exec $${script} - else - echo "make test-${name} not implemented: $${script} not found" >&2 + set -e; \ + script="./scripts/tests/${name}.sh"; \ + if [ -e "$${script}" ]; then \ + exec $${script}; \ + else \ + echo "make test-${name} not implemented: $${script} not found" >&2; \ fi ${VERBOSE}.SILENT: \