Fix yq syntax in deployment script for Debian yq version
This commit is contained in:
parent
0076e263f9
commit
dacb06fdc8
|
|
@ -111,20 +111,20 @@ load_configuration() {
|
|||
|
||||
# Check if yq is available for YAML parsing
|
||||
if ! command -v yq &> /dev/null; then
|
||||
print_error "yq is required for YAML parsing. Install with: snap install yq or brew install yq"
|
||||
print_error "yq is required for YAML parsing. Install with: apt-get install yq"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract configuration values
|
||||
SSH_HOST=$(yq e '.ssh.host' "$CONFIG_FILE")
|
||||
SSH_PORT=$(yq e '.ssh.port' "$CONFIG_FILE")
|
||||
SSH_USERNAME=$(yq e '.ssh.username' "$CONFIG_FILE")
|
||||
SSH_KEY_FILE=$(yq e '.ssh.key_file' "$CONFIG_FILE")
|
||||
# Extract configuration values (yq with jq syntax)
|
||||
SSH_HOST=$(yq -r '.ssh.host' "$CONFIG_FILE")
|
||||
SSH_PORT=$(yq -r '.ssh.port' "$CONFIG_FILE")
|
||||
SSH_USERNAME=$(yq -r '.ssh.username' "$CONFIG_FILE")
|
||||
SSH_KEY_FILE=$(yq -r '.ssh.key_file' "$CONFIG_FILE")
|
||||
|
||||
TARGET_DIR=$(yq e '.deployment.target_dir' "$CONFIG_FILE")
|
||||
BACKUP_DIR=$(yq e '.deployment.backup_dir' "$CONFIG_FILE")
|
||||
LOG_DIR=$(yq e '.deployment.log_dir' "$CONFIG_FILE")
|
||||
CONFIG_DIR=$(yq e '.deployment.config_dir' "$CONFIG_FILE")
|
||||
TARGET_DIR=$(yq -r '.deployment.target_dir' "$CONFIG_FILE")
|
||||
BACKUP_DIR=$(yq -r '.deployment.backup_dir' "$CONFIG_FILE")
|
||||
LOG_DIR=$(yq -r '.deployment.log_dir' "$CONFIG_FILE")
|
||||
CONFIG_DIR=$(yq -r '.deployment.config_dir' "$CONFIG_FILE")
|
||||
|
||||
# Validate required configuration
|
||||
if [[ -z "$SSH_HOST" || -z "$SSH_USERNAME" || -z "$SSH_KEY_FILE" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue