We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f5afe5 commit f26cbfeCopy full SHA for f26cbfe
1 file changed
infra/dcp/update_image_tag.sh
@@ -81,8 +81,8 @@ echo "📝 Updating $TFVARS_FILE..."
81
82
# Check if dcp_image_tag already exists
83
if grep -q "^dcp_image_tag" "$TFVARS_FILE"; then
84
- # Use sed to replace the line. (Special syntax for macOS)
85
- sed -i '' "s/^dcp_image_tag.*/dcp_image_tag = \"$TAG\"/" "$TFVARS_FILE"
+ # Replace the line using a temporary file for cross-platform compatibility (macOS/Linux)
+ sed "s/^dcp_image_tag.*/dcp_image_tag = \"$TAG\"/" "$TFVARS_FILE" > "${TFVARS_FILE}.tmp" && mv "${TFVARS_FILE}.tmp" "$TFVARS_FILE"
86
else
87
# Append to end of file if it doesn't exist
88
echo "" >> "$TFVARS_FILE"
0 commit comments