From 69809346b7c5c710eca080e5390244be53dc2732 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Fri, 10 Oct 2025 17:42:56 -0400 Subject: Replace tools with scripts and use them in .build.yml --- scripts/lib/env.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/lib/env.sh (limited to 'scripts/lib/env.sh') diff --git a/scripts/lib/env.sh b/scripts/lib/env.sh new file mode 100644 index 0000000..e598584 --- /dev/null +++ b/scripts/lib/env.sh @@ -0,0 +1,20 @@ +# shellcheck shell=bash +[[ -n "${BOLT_ENV_LOADED:-}" ]] && return +readonly BOLT_ENV_LOADED=1 + +source "$(dirname "${BASH_SOURCE[0]}")/log.sh" + +load_env_file() { + local -r env_file="$1" + if [[ ! -f "$env_file" ]]; then + log_error "Environment file not found: $env_file" + return 1 + fi + + set -a + # shellcheck disable=SC1090 + source "$env_file" + set +a + + log_info "Loaded environment from $env_file" +} -- cgit v1.2.3