1
0
Fork 0

Derive output filename from build system LINEAGE_VERSION

Use build/soong/bin/get_build_var LINEAGE_VERSION to query
the build system for the version string, producing filenames
like lineage-23.2-20260711-UNOFFICIAL-orangepi5ultra.img.

Removes fragile zip-parsing and hardcoded fallback. Fails
cleanly if LINEAGE_VERSION cannot be resolved.

Copyright (C) 2026 Brendan Szymanski <hello@bscubed.dev>
This commit is contained in:
Brendan Szymanski 2026-07-11 16:01:51 -04:00
parent 0828852ffe
commit 548445f2ae

View file

@ -50,7 +50,10 @@ if [ ! -f "${UBOOT_BIN}" ]; then
exit_with_error "Missing U-Boot: ${UBOOT_BIN}"
fi
: "${LINEAGE_VERSION:?LINEAGE_VERSION environment variable is not set. Run lunch first.}"
LINEAGE_VERSION=$(build/soong/bin/get_build_var LINEAGE_VERSION)
if [ -z "${LINEAGE_VERSION}" ]; then
exit_with_error "LINEAGE_VERSION is empty. Run 'lunch' first and ensure the build environment is configured."
fi
IMGSIZE=19456MiB
IMAGE_PATH="${ANDROID_PRODUCT_OUT}/lineage-${LINEAGE_VERSION}.img"