From 13493e82f83f311b139058318c307e0b30acf1d0 Mon Sep 17 00:00:00 2001 From: ecpullen Date: Wed, 6 Dec 2023 18:09:45 +0000 Subject: [PATCH] twoliter: Make `BUILDSYS_VERSION_IMAGE` required --- twoliter/embedded/Makefile.toml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/twoliter/embedded/Makefile.toml b/twoliter/embedded/Makefile.toml index d71d9d49f..044960d49 100644 --- a/twoliter/embedded/Makefile.toml +++ b/twoliter/embedded/Makefile.toml @@ -22,7 +22,6 @@ BUILDSYS_VERSION_BUILD = { script = ["git describe --always --dirty --exclude '* # later in this section. You have to edit the path here in Makefile.toml to # use a different Release.toml. BUILDSYS_RELEASE_CONFIG_PATH = "${BUILDSYS_ROOT_DIR}/Release.toml" - # This can be overridden with -e to build a different variant from the variants/ directory BUILDSYS_VARIANT = { script = ['echo "${BUILDSYS_VARIANT:-aws-k8s-1.24}"'] } # Product name used for file and directory naming @@ -137,8 +136,6 @@ TESTSYS_LOG_LEVEL = "info" # Certain variables are defined here to allow us to override a component value # on the command line. -BUILDSYS_VERSION_IMAGE = { script = ["awk -F '[ =\"]+' '$1 == \"version\" {print $2}' ${BUILDSYS_RELEASE_CONFIG_PATH}"], condition = { env_not_set = ["BUILDSYS_VERSION_IMAGE"]}} - # Depends on ${BUILDSYS_JOBS}. CARGO_MAKE_CARGO_LIMIT_JOBS = "--jobs ${BUILDSYS_JOBS}" CARGO_MAKE_CARGO_ARGS = "--offline --locked" @@ -265,6 +262,13 @@ if [[ -z "${TLPRIVATE_SDK_IMAGE}" || -z "{TLPRIVATE_TOOLCHAIN}" ]];then exit 1 fi +# Ensure BUILDSYS_VERSION_IMAGE is set +if [[ -z "${BUILDSYS_VERSION_IMAGE}" ]];then + echo "BUILDSYS_VERSION_IMAGE must be defined and must be non-zero in length." + echo "Are you using Twoliter? It is a bug if Twoliter has invoked cargo make without this." + exit 1 +fi + mkdir -p ${BUILDSYS_BUILD_DIR} mkdir -p ${BUILDSYS_OUTPUT_DIR} mkdir -p ${BUILDSYS_PACKAGES_DIR}