Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for pulumi command env vars in install script #72

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions provider/cmd/provisioner/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ DEV_MODE="${DEV_MODE:-false}"
GIT="$(assertTool 'git')"
JQ="$(assertTool 'jq')"

# Supporting PULUMI_COMMAND_* prefixes allows for safer sshd AcceptEnv= configurations.
INSTALL_DIR="${INSTALL_DIR:-${PULUMI_COMMAND_INSTALL_DIR:-}}"
CONFIG_DIR="${CONFIG_DIR:-${PULUMI_COMMAND_CONFG_DIR:-}}"
LISTEN_ADDRESS="${LISTEN_ADDRESS:-${PULUMI_COMMAND_LISTEN_ADDRESS:-}}"
SYSTEMD_SERVICE_FILE="${SYSTEMD_SERVICE_FILE:-${PULUMI_COMMAND_SYSTEMD_SERVICE_FILE:-}}"
WORK="${WORK:-${PULUMI_COMMAND_WORK:-}}"
VERSION="${VERSION:-${PULUMI_COMMAND_VERSION:-}}"
SRC_BIN="${SRC_BIN:-${PULUMI_COMMAND_SRC_BIN:-}}"
BIN_NAME="${BIN_NAME:-${PULUMI_COMMAND_BIN_NAME:-}}"

if GIT_ROOT=$($GIT rev-parse --show-toplevel 2>/dev/null); then
IS_GIT=true
else
IS_GIT=false
fi

if $IS_GIT; then
if $DEV_MODE; then
echo 'Using git repository root'
WORK="$GIT_ROOT/hack/.work"
Expand All @@ -57,6 +63,8 @@ if $IS_GIT; then
echo 'Skipping when in a git repository'
exit 0
fi
else
IS_GIT=false
fi

if [ -n "${CI:-}" ]; then
Expand Down
Loading