mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-19 03:25:00 +00:00
chore: export more vars as readonly
This commit is contained in:
7
build.sh
7
build.sh
@@ -14,13 +14,16 @@ get_yaml_array() {
|
||||
}
|
||||
export -f get_yaml_array # this makes the function available to all modules
|
||||
|
||||
# Automatically determine which Fedora version we're building.
|
||||
export FEDORA_VERSION="$(grep -Po '(?<=VERSION_ID=)\d+' /usr/lib/os-release)"
|
||||
# Declare dynamically generated variables as read-only and exported
|
||||
declare -rx IMAGE_NAME BASE_IMAGE FEDORA_VERSION
|
||||
|
||||
# Read configuration variables.
|
||||
BASE_IMAGE="$(yq '.base-image' "$RECIPE_FILE")"
|
||||
IMAGE_NAME="$(yq '.name' "$RECIPE_FILE")"
|
||||
|
||||
# Automatically determine which Fedora version we're building.
|
||||
FEDORA_VERSION="$(grep -Po '(?<=VERSION_ID=)\d+' /usr/lib/os-release)"
|
||||
|
||||
# Welcome.
|
||||
echo "Building $IMAGE_NAME from Fedora $FEDORA_VERSION ($BASE_IMAGE)."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user