Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
dorsradek committed Aug 19, 2024
1 parent 8f715c0 commit 2f317e8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions parse-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ load_dir() {

# $3, is the numbers of characters to strip in front of the key
KEY="${KEY:$3}"

# Removes the application.$application_name prefix if it exists
if [[ "$KEY" == "application.$APPLICATION_NAME."* ]]; then
KEY=${KEY#"application.$APPLICATION_NAME."}
fi

# Removes the .terraform suffix if it exists
if [[ "$KEY" == *".terraform" ]]; then
KEY=${KEY%".terraform"}
fi

# Removes the infrastructure.global. prefix if it exists
if [[ "$KEY" == "infrastructure.global."* ]]; then
Expand All @@ -49,16 +59,6 @@ load_dir() {
if [[ "$KEY" == "application."* ]]; then
KEY=${KEY#"application."}
fi

# Removes the application.$application_name prefix if it exists
if [[ "$KEY" == "application.$APPLICATION_NAME."* ]]; then
KEY=${KEY#"application.$APPLICATION_NAME."}
fi

# Removes the .terraform suffix if it exists
if [[ "$KEY" == *".terraform" ]]; then
KEY=${KEY%".terraform"}
fi

log "source=$FILENAME destination=$KEY"

Expand Down

0 comments on commit 2f317e8

Please sign in to comment.