From 2e283b30e8b17a4632be2a5690a2bf7686cbbc19 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 4 May 2022 19:21:20 +0800 Subject: [PATCH] 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 --- make-dist | 6 +++--- src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh | 2 +- src/pybind/mgr/dashboard/frontend/CMakeLists.txt | 2 +- src/pybind/mgr/dashboard/run-frontend-unittests.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/make-dist b/make-dist index df1d88ae3e3..ffb3b2f6085 100755 --- a/make-dist +++ b/make-dist @@ -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 diff --git a/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh b/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh index 26fbd8a7c4b..b69e28e41eb 100755 --- a/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh +++ b/src/pybind/mgr/dashboard/ci/cephadm/start-cluster.sh @@ -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 diff --git a/src/pybind/mgr/dashboard/frontend/CMakeLists.txt b/src/pybind/mgr/dashboard/frontend/CMakeLists.txt index cb76722bac1..f92c34791c0 100644 --- a/src/pybind/mgr/dashboard/frontend/CMakeLists.txt +++ b/src/pybind/mgr/dashboard/frontend/CMakeLists.txt @@ -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() diff --git a/src/pybind/mgr/dashboard/run-frontend-unittests.sh b/src/pybind/mgr/dashboard/run-frontend-unittests.sh index 997b86bbf67..0ef10fadd49 100755 --- a/src/pybind/mgr/dashboard/run-frontend-unittests.sh +++ b/src/pybind/mgr/dashboard/run-frontend-unittests.sh @@ -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