cmake: s/--prod/--configuration=production/

to silence the warning from Angular 12.0 and up, which complains like:

Option "--prod" is deprecated: Use "--configuration production" instead

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
Kefu Chai 2022-05-04 19:21:20 +08:00
parent dbe7f75e66
commit 2e283b30e8
4 changed files with 6 additions and 6 deletions

View File

@ -138,9 +138,9 @@ build_dashboard_frontend() {
. $TEMP_DIR/bin/activate
NG_CLI_ANALYTICS=false timeout 1h npm ci
echo "Building ceph-dashboard frontend with build:localize script";
# we need to use "--" because so that "--prod" survives accross all
# scripts redirections inside package.json
npm run build:localize -- --prod
# we need to use "--" because so that "--configuration production"
# survives accross all scripts redirections inside package.json
npm run build:localize -- --configuration production
deactivate
cd $CURR_DIR
rm -rf $TEMP_DIR

View File

@ -64,7 +64,7 @@ if [[ -n "$JENKINS_HOME" ]]; then
npm cache clean --force
fi
npm ci
FRONTEND_BUILD_OPTS='-- --prod'
FRONTEND_BUILD_OPTS='-- --configuration production'
if [[ -n "${DEV_MODE}" ]]; then
FRONTEND_BUILD_OPTS+=' --deleteOutputPath=false --watch'
fi

View File

@ -109,7 +109,7 @@ execute_process(
set(frontend_dist_dir "${CMAKE_CURRENT_BINARY_DIR}/dist")
set(npm_args "--output-path ${frontend_dist_dir}")
if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
string(APPEND npm_args " --prod --progress=false")
string(APPEND npm_args " --configuration=production --progress=false")
else()
string(APPEND npm_args " --progress=false")
endif()

View File

@ -11,7 +11,7 @@ if [ `uname` != "FreeBSD" ]; then
fi
# Build
npm run build -- --prod --progress=false || failed=true
npm run build -- --configuration=production --progress=false || failed=true
# Unit Tests
npm run test:ci || failed=true