Skip to content

sed command in deploy script for adk-auto-insurance setup is focused on MAC only. #296

@carlosmscabral

Description

@carlosmscabral

Describe the bug

If running on Linux (Cloud Shell), variables don't get replaced.

To Reproduce

Deploy using Cloud Shell

Expected behavior

Sed should work both on Mac and Unix/Linux.

We should do something like:

echo "Registering APIs in Apigee API hub"
cp -rf config tmp/
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' "s/APIGEE_HOST/$APIGEE_HOST/g" tmp//.yaml
sed -i '' "s/APIGEE_APIHUB_PROJECT_ID/$APIGEE_APIHUB_PROJECT_ID/g" tmp//.json
sed -i '' "s/APIGEE_APIHUB_REGION/$APIGEE_APIHUB_REGION/g" tmp//.json
else
sed -i "s/APIGEE_HOST/$APIGEE_HOST/g" tmp//.yaml
sed -i "s/APIGEE_APIHUB_PROJECT_ID/$APIGEE_APIHUB_PROJECT_ID/g" tmp//.json
sed -i "s/APIGEE_APIHUB_REGION

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions