Branch: refs/heads/add_ci_builders Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Sun, 06 Mar 2022 18:00:46 UTC Commit: 6362b27ae6ae7ae951262ae4d8a7bfb84e9a44bd https://github.com/geany/infrastructure/commit/6362b27ae6ae7ae951262ae4d8a7b...
Log Message: ----------- Add option to force rebuilding images
Modified Paths: -------------- builders/README.md builders/start_build.sh
Modified: builders/README.md 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -55,6 +55,7 @@ the builds of Geany and Geany-Plugins for the various targets. [-r|--rebuild-images] -d, --distro DISTRO Build for target Debian DISTRO (e.g. "bullseye", can be specified multiple times + -f, --force-rebuild Force rebuilding of immages even if not necessary -g, --geany Build Geany --geany-source Path to a Geany source directory (optional, cloned from GIT if missing) --geany-plugins-source Path to a Geany-Plugins source directory (optional, cloned from GIT if missing)
Modified: builders/start_build.sh 8 lines changed, 7 insertions(+), 1 deletions(-) =================================================================== @@ -13,6 +13,7 @@ # [-r|--rebuild-images] # -d, --distro DISTRO Build for target Debian DISTRO (e.g. "bullseye", # can be specified multiple times +# -f, --force-rebuild Force rebuilding of immages even if not necessary # -g, --geany Build Geany # --geany-source Path to a Geany source directory (optional, cloned from GIT if missing) # --geany-plugins-source Path to a Geany-Plugins source directory (optional, cloned from GIT if missing) @@ -63,7 +64,7 @@ rebuild_image() { image_date=$(echo "${image_date}" | xargs) # trim leading and trailing whitespace image_date_seconds=$(date --date="${image_date}" "+%s") expire_date_seconds=$(date --date="${DOCKER_IMAGE_MAX_AGE_DAYS} days ago" "+%s") - if [ "${image_date_seconds}" -lt "${expire_date_seconds}" ] || [ -n "${DO_IMAGE_REBUILD}" ]; then + if [ "${image_date_seconds}" -lt "${expire_date_seconds}" ] || [ -n "${DO_FORCE_IMAGE_REBUILD}" ]; then log - "Building image ${image_name} (last build: ${image_date})" log "${BASE_OUTPUT_DIRECTORY}/docker_image_build_${image_name}_$(date '+%Y_%m_%d_%H_%M_%S').log" \ ${DOCKER_CMD} build \ @@ -219,6 +220,10 @@ parse_command_line_options() { shift shift ;; + -f|--force-rebuild) + DO_FORCE_IMAGE_REBUILD=1 + shift + ;; -g|--geany) DO_GEANY=1 shift @@ -264,6 +269,7 @@ parse_command_line_options() { DO_DISTRO= DO_MINGW64= DO_IMAGE_REBUILD= +DO_FORCE_IMAGE_REBUILD= DO_GEANY= DO_GEANY_PLUGINS= DO_LOG_TO_STDOUT=
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).