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
commit 4e53bf9f76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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
}