diff --git a/Makefile b/Makefile index 8b5c7fc..df79f59 100644 --- a/Makefile +++ b/Makefile @@ -213,7 +213,7 @@ _gen-readme-docs: @echo "################################################################################" @echo "# Generate doc/php-modules.md for PHP $(VERSION) ($(IMAGE):$(DOCKER_TAG)) on $(ARCH)" @echo "################################################################################" - ./bin/gen-readme.sh $(IMAGE) $(ARCH) $(STAGE) $(VERSION) || bash -x ./bin/gen-readme.sh $(IMAGE) $(ARCH) $(STAGE) $(VERSION) + ./bin/gen-docs-php-modules.sh $(IMAGE) $(ARCH) $(STAGE) $(VERSION) || bash -x ./bin/gen-docs-php-modules.sh $(IMAGE) $(ARCH) $(STAGE) $(VERSION) git diff --quiet || { echo "Build Changes"; git diff; git status; false; } @echo @@ -242,12 +242,12 @@ gen-dockerfiles: @echo "################################################################################" @echo "# Generating PHP modules" @echo "################################################################################" - ./bin/modules-generate.py $(MODS) + ./bin/gen-php-modules.py $(MODS) @echo @echo "################################################################################" @echo "# Generating Tools" @echo "################################################################################" - ./bin/tools-generate.py $(TOOLS) + ./bin/gen-php-tools.py $(TOOLS) @echo @echo "################################################################################" @echo "# Generating Dockerfiles" diff --git a/bin/gen-readme.sh b/bin/gen-docs-php-modules.sh similarity index 97% rename from bin/gen-readme.sh rename to bin/gen-docs-php-modules.sh index 2e2b4ab..1f2b319 100755 --- a/bin/gen-readme.sh +++ b/bin/gen-docs-php-modules.sh @@ -9,6 +9,10 @@ set -o pipefail SCRIPT_PATH="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" SCRIPT_NAME="$(basename "${SCRIPT_PATH}")" REPO_PATH="${SCRIPT_PATH}/.." + +### +### This file is being updated +### README="${REPO_PATH}/doc/php-modules.md" @@ -105,14 +109,14 @@ get_modules_from_image() { ### -### Validate that README.md has all modules defined that are found in the PHP docker image +### Validate that *.md file has all modules defined that are found in the PHP docker image ### validate_readme() { local php_version="${1}" local modules_img="${2}" # Modules found in the PHP docker image local stage="${3}" # base or mods - # Check if README.md contains all modules we have retrieved from the PHP image + # Check if *.md contains all modules we have retrieved from the PHP image while read -r line; do module="$( echo "${line}" | tr '[:upper:]' '[:lower:]' )" search="ext_${stage}_${module}_${php_version}" @@ -126,7 +130,7 @@ validate_readme() { ### -### Update README.md for a specific PHP version +### Update *.md for a specific PHP version ### update_readme() { local php_version="${1}" diff --git a/bin/modules-generate.py b/bin/gen-php-modules.py similarity index 100% rename from bin/modules-generate.py rename to bin/gen-php-modules.py diff --git a/bin/tools-generate.py b/bin/gen-php-tools.py similarity index 96% rename from bin/tools-generate.py rename to bin/gen-php-tools.py index 691e581..5b6bf2f 100755 --- a/bin/tools-generate.py +++ b/bin/gen-php-tools.py @@ -199,14 +199,14 @@ def write_group_vars(tools: List[str]) -> None: # -------------------------------------------------------------------------------------------------- def print_help() -> None: """Show help screen.""" - print("Usage:", os.path.basename(__file__), "[options] [PHP-EXT]...") + print("Usage:", os.path.basename(__file__), "[options] [PHP-TOOL]...") print(" ", os.path.basename(__file__), "-h, --help") print() print("This script will generate the Ansible group_vars file: .ansible/group_vars/all/work.yml") print("based on all the tools found in php_tools/ directory.") print() print("Positional arguments:") - print(" [PHP-EXT] Specify None, one or more PHP tools to generate group_vars for.") + print(" [PHP-TOOL] Specify None, one or more PHP tools to generate group_vars for.") print(" When no PHP tool is specified (argument is omitted), group_vars") print(" for all tools will be genrated.") print(" When one or more PHP tool are specified, only group_vars for") @@ -219,9 +219,9 @@ def print_help() -> None: print(" the changes to take effect, before building the image.") print("Optional arguments:") print(" -i Ignore dependent tools.") - print(" By default each exentions is checked for build dependencies of other") - print(" tools. For example many tools build against libxml ext.") - print(" By specifying -i, those dependencies are not beeing added to") + print(" By default each tool is checked for dependencies of other") + print(" tools.") + print(" By specifying -i, those dependent tools are not beeing added to") print(" ansible group_vars. Use at your own risk.")