set telemetry post frontend build in standalone docker img

This commit is contained in:
Maidul Islam
2023-10-17 12:22:08 +01:00
parent 136308f299
commit fb7c7045e9
10 changed files with 53 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
#!/bin/sh
ORIGINAL=$1
REPLACEMENT=$2
if [ "${ORIGINAL}" = "${REPLACEMENT}" ]; then
echo "Environment variable replacement is the same, skipping.."
exit 0
fi
echo "Replacing pre-baked value.."
find public .next -type f -name "*.js" |
while read file; do
sed -i "s|$ORIGINAL|$REPLACEMENT|g" "$file"
done