Skip to content

Commit

Permalink
fix(setup): ignore comment lines in env files (autowarefoundation#328)
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Miyake <[email protected]>
  • Loading branch information
kenji-miyake authored May 23, 2022
1 parent 1447719 commit 717e197
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build-and-push-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:

- name: Load env
run: |
cat amd64.env | sed "/^#/d" >> $GITHUB_ENV
cat amd64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
if [ "$(uname -m)" = "aarch64" ]; then
cat arm64.env | sed "/^#/d" >> $GITHUB_ENV
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-universe'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:

- name: Load env
run: |
cat amd64.env | sed "/^#/d" >> $GITHUB_ENV
cat amd64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
if [ "$(uname -m)" = "aarch64" ]; then
cat arm64.env | sed "/^#/d" >> $GITHUB_ENV
cat arm64.env | sed -e "s/^\s*//" -e "/^#/d" >> $GITHUB_ENV
fi
- name: Build 'autoware-universe'
Expand Down
2 changes: 1 addition & 1 deletion setup-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fi

# Add env args
# shellcheck disable=SC2013
for env_name in $(sed "s/=.*//" <amd64.env); do
for env_name in $(sed -e "s/^\s*//" -e "/^#/d" -e "s/=.*//" <amd64.env); do
ansible_args+=("--extra-vars" "${env_name}=${!env_name}")
done

Expand Down

0 comments on commit 717e197

Please sign in to comment.