From bccef77d4ecca8885b09fc56b5840df968d028e8 Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Wed, 12 Apr 2023 10:07:41 -0400 Subject: [PATCH] Update env sourcing. --- deployment/remote.sh | 5 +++-- deployment/stub_lxc_profile.sh | 2 ++ deployment/up.sh | 3 +-- deployment/update.sh | 2 +- install.sh | 5 +++++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/deployment/remote.sh b/deployment/remote.sh index fc89ecb..9e984d7 100755 --- a/deployment/remote.sh +++ b/deployment/remote.sh @@ -18,8 +18,9 @@ if [ -z "$REMOTE_NAME" ]; then exit 1 fi -#shellcheck disable=SC1091 -source ./deployment_defaults.sh +. ./deployment_defaults.sh + +. ./base.sh export REMOTE_PATH="$REMOTES_PATH/$REMOTE_NAME" REMOTE_DEFINITION="$REMOTE_PATH/remote.conf" diff --git a/deployment/stub_lxc_profile.sh b/deployment/stub_lxc_profile.sh index c4c1be4..9201c9a 100755 --- a/deployment/stub_lxc_profile.sh +++ b/deployment/stub_lxc_profile.sh @@ -75,6 +75,8 @@ EOF fi +. ./target.sh + # if VIRTUAL_MACHINE=base, then we doing the base image. if [ "$VIRTUAL_MACHINE" = base ]; then # this is for the base image only... diff --git a/deployment/up.sh b/deployment/up.sh index d4883b6..b3f66c6 100755 --- a/deployment/up.sh +++ b/deployment/up.sh @@ -3,8 +3,7 @@ set -eu cd "$(dirname "$0")" -LATEST_GIT_COMMIT="$(cat ./project/.git/refs/heads/main)" -export LATEST_GIT_COMMIT="$LATEST_GIT_COMMIT" +. ./target.sh # check to ensure dependencies are met. for cmd in wait-for-it dig rsync sshfs lxc; do diff --git a/deployment/update.sh b/deployment/update.sh index b955f05..e0cba52 100755 --- a/deployment/update.sh +++ b/deployment/update.sh @@ -3,7 +3,7 @@ set -eu cd "$(dirname "$0")" -TARGET_PROJECT_GIT_COMMIT=2e68e93303196fd57b1b473b149b5a82c9faa4f0 +. ./target.sh # # As part of the install script, we pull down any other sovereign-stack git repos # PROJECTS_SCRIPTS_REPO_URL="https://git.sovereign-stack.org/ss/project" diff --git a/install.sh b/install.sh index a76e3f9..73e36b8 100755 --- a/install.sh +++ b/install.sh @@ -59,6 +59,11 @@ EOF fi +. ./deployment/deployment_defaults.sh + +. ./deployment/base.sh + + # we need to get the base image. IMport it if it's cached, else download it then cache it. if ! lxc image list | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then