diff --git a/Makefile b/Makefile index a734d6b5b..64b296e30 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # Makefile versions -MAKEFILE_VERSION := 2.0 +MAKEFILE_VERSION := 2.1 UPDATE_VERSION := make/latest # Repository versions @@ -175,6 +175,48 @@ docs: @echo "* $(CLR_BLUE)$(SRC_TAGGED_URL_BASE)/docs/user-guide.md$(CLR_END)" @echo "" +verify_tooling: .venv + @( \ + . .venv/bin/activate; \ + python3 --version &> /dev/null && \ + ( \ + python3 -c "import sys; sys.version_info < (3,11) and sys.exit(1)" || \ + ( \ + python3 --version && \ + echo '$(CLR_RED)Python version is too old!$(CLR_END)' && \ + echo '$(CLR_RED)Python v3.11 or later is required.$(CLR_END)' && \ + exit 1 \ + ) \ + ) || ( \ + echo '$(CLR_RED)Python is not installed!$(CLR_END)' && \ + exit 1 \ + ); \ + ) + @( \ + docker --version &> /dev/null || ( \ + echo '$(CLR_RED)Docker is not installed!$(CLR_END)' && \ + exit 1 \ + ); \ + ) + @( \ + git --version &> /dev/null || ( \ + echo '$(CLR_RED)Git is not installed!$(CLR_END)' && \ + exit 1 \ + ); \ + ) + @( \ + sed --version &> /dev/null || ( \ + echo '$(CLR_RED)Sed is not installed!$(CLR_END)' && \ + exit 1 \ + ); \ + ) + @( \ + jq --version &> /dev/null || ( \ + echo '$(CLR_RED)Jq is not installed!$(CLR_END)' && \ + exit 1 \ + ); \ + ) + pre_build: build_deps docker version_number git_ignore pre_deps_build: deps docker version_number git_ignore @@ -194,7 +236,7 @@ post_build: @echo "$(CLR_GREEN)To deploy ADF, please run:$(CLR_END) make deploy" @echo "" -build: pre_build sam_build post_build +build: verify_tooling pre_build sam_build post_build deps_build: pre_deps_build sam_build post_build diff --git a/docs/installation-guide.md b/docs/installation-guide.md index 9669bd06c..03ee39f49 100644 --- a/docs/installation-guide.md +++ b/docs/installation-guide.md @@ -74,6 +74,9 @@ Please note that building on *Windows* is not supported, please use the - [python 3](https://www.python.org/downloads/) - To test if it is available, run `python --version`. This should return 3.11 or later. +- [jq](https://github.com/jqlang/jq) + - To test if it is available, run `jq --version`. + This version should be 1.6 or later. - [sed](https://www.gnu.org/software/sed/) - To test if it is available, run `sed --version`. This should return 4.3 or later.