Skip to content

Commit

Permalink
Update run_container to use yq not awk
Browse files Browse the repository at this point in the history
  • Loading branch information
antonjahn authored Nov 7, 2024
1 parent fa140b8 commit cd98ae5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions usage/run_container
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ echo "RUNNER: ${RUNNER}"
GIT_ROOT=$(git rev-parse --show-toplevel)

if [ -z "$1" ]; then
VERSION=$(cat ${GIT_ROOT}/configuration/build_config.yaml | grep Version: | awk -F " " '{print $2}')
VERSION=$(yq .Version ${GIT_ROOT}/configuration/build_config.yaml)
else
VERSION=$1
fi
CONTAINER_NAME=$(cat ${GIT_ROOT}/configuration/build_config.yaml | grep Base-Name: | awk -F " " '{print $2}')
REPO_NAME=$(cat ${GIT_ROOT}/configuration/build_config.yaml | grep Repository: | awk -F " " '{print $2}')
CONTAINER_NAME=$(yq '.["Base-Name"]' ${GIT_ROOT}/configuration/build_config.yaml)
REPO_NAME=$(yq .Repository ${GIT_ROOT}/configuration/build_config.yaml)
CONTAINER_IMAGE="${REPO_NAME}/${CONTAINER_NAME}:${VERSION}"

if [ -z "$IMAGES" ]; then
Expand Down

0 comments on commit cd98ae5

Please sign in to comment.