Fixes for create-next-app
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 37s
Smoke Test / Run basic test suite (pull_request) Has been cancelled
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Has been cancelled
Deploy Test / Run deploy test suite (pull_request) Has been cancelled
Webapp Test / Run webapp test suite (pull_request) Successful in 5m5s
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 37s
Smoke Test / Run basic test suite (pull_request) Has been cancelled
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Has been cancelled
Deploy Test / Run deploy test suite (pull_request) Has been cancelled
Webapp Test / Run webapp test suite (pull_request) Successful in 5m5s
This commit is contained in:
parent
e3b0d244f1
commit
671569e116
@ -128,8 +128,16 @@ fi
|
|||||||
|
|
||||||
tail -$(( ${CONFIG_LINES} - ${NEXT_SECTION_LINE} + ${NEXT_SECTION_ADJUSTMENT} )) ${NEXT_CONFIG_JS} > ${NEXT_CONFIG_JS}.4
|
tail -$(( ${CONFIG_LINES} - ${NEXT_SECTION_LINE} + ${NEXT_SECTION_ADJUSTMENT} )) ${NEXT_CONFIG_JS} > ${NEXT_CONFIG_JS}.4
|
||||||
|
|
||||||
cat ${NEXT_CONFIG_JS}.{0,1,2} > ${NEXT_CONFIG_JS}
|
rm -f ${NEXT_CONFIG_JS}
|
||||||
cat ${NEXT_CONFIG_JS}.{3,4} | sed 's/^ *//g' | js-beautify | grep -v 'process\.\env\.' | js-beautify >> ${NEXT_CONFIG_JS}
|
for ((i=0; i <=5; i++)); do
|
||||||
|
if [ -f "${NEXT_CONFIG_JS}.${i}" ]; then
|
||||||
|
if [ $i -le 2 ] ; then
|
||||||
|
cat ${NEXT_CONFIG_JS}.${i} >> ${NEXT_CONFIG_JS}
|
||||||
|
else
|
||||||
|
cat ${NEXT_CONFIG_JS}.${i} | sed 's/^ *//g' | js-beautify | grep -v 'process\.\env\.' | js-beautify >> ${NEXT_CONFIG_JS}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
rm ${NEXT_CONFIG_JS}.*
|
rm ${NEXT_CONFIG_JS}.*
|
||||||
|
|
||||||
"${SCRIPT_DIR}/find-env.sh" "$(pwd)" > .env-list.json
|
"${SCRIPT_DIR}/find-env.sh" "$(pwd)" > .env-list.json
|
||||||
@ -147,11 +155,14 @@ if [ "$CERC_NEXT_VERSION" != "keep" ] && [ "$CUR_NEXT_VERSION" != "$CERC_NEXT_VE
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
CUR_WEBPACK_VERSION="`jq -r '.dependencies.webpack' package.json`"
|
CUR_WEBPACK_VERSION="`jq -r '.dependencies.webpack' package.json`"
|
||||||
|
if [ -z "$CUR_WEBPACK_VERSION" ]; then
|
||||||
|
CUR_WEBPACK_VERSION="`jq -r '.devDependencies.webpack' package.json`"
|
||||||
|
fi
|
||||||
if [ "${CERC_WEBPACK_VERSION}" != "keep" ] || [ "${CUR_WEBPACK_VERSION}" == "null" ]; then
|
if [ "${CERC_WEBPACK_VERSION}" != "keep" ] || [ "${CUR_WEBPACK_VERSION}" == "null" ]; then
|
||||||
if [ -z "$CERC_WEBPACK_VERSION" ] || [ "$CERC_WEBPACK_VERSION" == "keep" ]; then
|
if [ -z "$CERC_WEBPACK_VERSION" ] || [ "$CERC_WEBPACK_VERSION" == "keep" ]; then
|
||||||
CERC_WEBPACK_VERSION="${CERC_DEFAULT_WEBPACK_VER}"
|
CERC_WEBPACK_VERSION="${CERC_DEFAULT_WEBPACK_VER}"
|
||||||
fi
|
fi
|
||||||
echo "Webpack is required. Adding to webpack@$CERC_WEBPACK_VERSION to dependencies..." 1>&2
|
echo "Webpack is required for env variable substitution. Adding to webpack@$CERC_WEBPACK_VERSION to dependencies..." 1>&2
|
||||||
cat package.json | jq ".dependencies.webpack = \"$CERC_WEBPACK_VERSION\"" > package.json.$$
|
cat package.json | jq ".dependencies.webpack = \"$CERC_WEBPACK_VERSION\"" > package.json.$$
|
||||||
mv package.json.$$ package.json
|
mv package.json.$$ package.json
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user