Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maximelaboisson committed Apr 30, 2024
1 parent 0b4d46c commit a1973e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
context: .
environment:
- WORKDIR
- APPLICATION_NAME
volumes:
- env:$WORKDIR
- ./test/fixture/volumes/aws-secret:$WORKDIR/aws-secret
Expand Down
11 changes: 3 additions & 8 deletions parse-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ load_dir() {
KEY=${KEY#"infrastructure.global."}
fi

if [[ "$KEY" =~ ^"application." ]]; then
KEY=${KEY#"application."}
fi

# [[ "$string" =~ ^$prefix(.*)$suffix$ ]] && echo "${BASH_REMATCH[1]}"
PRE="$APPLICATION_NAME."
if [[ "$KEY" =~ ^$PRE ]]; then
KEY=${KEY#$PRE}
# 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
Expand Down

0 comments on commit a1973e8

Please sign in to comment.