From: Kefu Chai Date: Wed, 4 May 2022 11:21:20 +0000 (+0800) Subject: cmake: s/--prod/--configuration=production/ X-Git-Tag: v18.0.0~929^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e283b30e8b17a4632be2a5690a2bf7686cbbc19;p=ceph.git 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 --- diff --git a/make-dist b/make-dist index df1d88ae3e30..ffb3b2f60852 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 26fbd8a7c4b6..b69e28e41ebe 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 cb76722bac1a..f92c34791c07 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 997b86bbf679..0ef10fadd495 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