Streamlined repository helper binaries

This commit is contained in:
cytopia
2022-12-08 07:26:14 +01:00
parent 28b7aade7f
commit 0fb753511a
4 changed files with 15 additions and 11 deletions

View File

@@ -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"

View File

@@ -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}"

View File

@@ -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.")