Merge pull request #23 from Crossbell-Box/dev

fix: nextjs env replacement
This commit is contained in:
Kind Jeff
2022-09-30 09:54:08 +08:00
committed by GitHub
+1 -1
View File
@@ -22,7 +22,7 @@ function apply_path {
if [ -n "$configValue" ] && [ -n "$envValue" ]; then
# replace all
echo "Replace: ${configValue} with: ${envValue}"
find $nextFolder \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#$configValue#$envValue#g"
find $nextFolder \( -type d -wholename .next/cache -prune \) \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#$configValue#$envValue#g"
fi
done < $envFilename
}