Drop redundant rebuild-image flag

This commit is contained in:
Mikhail Chusavitin
2026-04-29 10:01:57 +03:00
parent 11d00b9442
commit d109e08fab
2 changed files with 4 additions and 10 deletions

View File

@@ -31,10 +31,10 @@ Build with explicit SSH keys baked into the ISO:
sh iso/builder/build-in-container.sh --authorized-keys ~/.ssh/id_ed25519.pub sh iso/builder/build-in-container.sh --authorized-keys ~/.ssh/id_ed25519.pub
``` ```
Rebuild the builder image: Force a clean rebuild of the builder image and build caches:
```sh ```sh
sh iso/builder/build-in-container.sh --rebuild-image sh iso/builder/build-in-container.sh --clean-build
``` ```
Use a custom cache directory: Use a custom cache directory:

View File

@@ -10,7 +10,6 @@ IMAGE_TAG="${BEE_BUILDER_IMAGE:-bee-iso-builder}"
BUILDER_PLATFORM="${BEE_BUILDER_PLATFORM:-linux/amd64}" BUILDER_PLATFORM="${BEE_BUILDER_PLATFORM:-linux/amd64}"
CACHE_DIR="${BEE_BUILDER_CACHE_DIR:-${REPO_ROOT}/dist/container-cache}" CACHE_DIR="${BEE_BUILDER_CACHE_DIR:-${REPO_ROOT}/dist/container-cache}"
AUTH_KEYS="" AUTH_KEYS=""
REBUILD_IMAGE=0
CLEAN_CACHE=0 CLEAN_CACHE=0
VARIANT="all" VARIANT="all"
@@ -22,17 +21,12 @@ while [ $# -gt 0 ]; do
CACHE_DIR="$2" CACHE_DIR="$2"
shift 2 shift 2
;; ;;
--rebuild-image)
REBUILD_IMAGE=1
shift
;;
--authorized-keys) --authorized-keys)
AUTH_KEYS="$2" AUTH_KEYS="$2"
shift 2 shift 2
;; ;;
--clean-build) --clean-build)
CLEAN_CACHE=1 CLEAN_CACHE=1
REBUILD_IMAGE=1
shift shift
;; ;;
--variant) --variant)
@@ -41,7 +35,7 @@ while [ $# -gt 0 ]; do
;; ;;
*) *)
echo "unknown arg: $1" >&2 echo "unknown arg: $1" >&2
echo "usage: $0 [--cache-dir /path] [--rebuild-image] [--clean-build] [--authorized-keys /path/to/authorized_keys] [--variant nvidia|nvidia-legacy|amd|nogpu|all]" >&2 echo "usage: $0 [--cache-dir /path] [--clean-build] [--authorized-keys /path/to/authorized_keys] [--variant nvidia|nvidia-legacy|amd|nogpu|all]" >&2
exit 1 exit 1
;; ;;
esac esac
@@ -105,7 +99,7 @@ image_matches_platform() {
} }
NEED_BUILD_IMAGE=0 NEED_BUILD_IMAGE=0
if [ "$REBUILD_IMAGE" = "1" ]; then if [ "$CLEAN_CACHE" = "1" ]; then
NEED_BUILD_IMAGE=1 NEED_BUILD_IMAGE=1
elif ! "$CONTAINER_TOOL" image inspect "${IMAGE_REF}" >/dev/null 2>&1; then elif ! "$CONTAINER_TOOL" image inspect "${IMAGE_REF}" >/dev/null 2>&1; then
NEED_BUILD_IMAGE=1 NEED_BUILD_IMAGE=1