apigee-samples icon indicating copy to clipboard operation
apigee-samples copied to clipboard

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

Open carlosmscabral opened this issue 5 months ago • 0 comments

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

carlosmscabral avatar Aug 07 '25 15:08 carlosmscabral