@@ -74,11 +74,15 @@ wizard_execute() {
7474 print_bl
7575 print_introduction
7676
77- print_bl
78- explain_prerequisites_ccud_maven_extension " I."
79-
80- print_bl
81- explain_prerequisites_api_access " II."
77+ if [[ " ${build_scan_publishing_mode} " == " on" ]]; then
78+ print_bl
79+ explain_prerequisites_ccud_maven_extension " I."
80+ print_bl
81+ explain_prerequisites_api_access " II."
82+ else
83+ print_bl
84+ explain_prerequisites_ccud_maven_extension
85+ fi
8286
8387 print_bl
8488 explain_collect_git_details
300304
301305explain_measure_build_results () {
302306 local text
303- IFS=' ' read -r -d ' ' text << EOF
307+ if [[ " ${build_scan_publishing_mode} " == " on" ]]; then
308+ IFS=' ' read -r -d ' ' text << EOF
304309$( print_separator)
305310${HEADER_COLOR} Measure build results${RESTORE}
306311
@@ -313,22 +318,36 @@ two builds to assist you in your investigation.
313318
314319${USER_ACTION_COLOR} Press <Enter> to measure the build results.${RESTORE}
315320EOF
321+ else
322+ IFS=' ' read -r -d ' ' text << EOF
323+ $( print_separator)
324+ ${HEADER_COLOR} Measure build results${RESTORE}
325+
326+ Now that the second build has finished successfully, you are ready to measure in
327+ Gradle Enterprise how well your build leverages the local build cache for
328+ the invoked set of Maven goals.
329+
330+ Some of the build scan data will be extracted from the locally stored, intermediate
331+ build data produced by the two builds to assist you in your investigation.
332+
333+ ${USER_ACTION_COLOR} Press <Enter> to measure the build results.${RESTORE}
334+ EOF
335+ fi
316336 print_wizard_text " ${text} "
317337 wait_for_enter
318338}
319339
320340explain_and_print_summary () {
321341 read_build_scan_metadata
322342 local text
323- IFS=' ' read -r -d ' ' text << EOF
343+ if [[ " ${build_scan_publishing_mode} " == " on" ]]; then
344+ IFS=' ' read -r -d ' ' text << EOF
324345The ‘Summary’ section below captures the configuration of the experiment and the
325346two build scans that were published as part of running the experiment. The build
326347scan of the second build is particularly interesting since this is where you can
327348inspect what goals were not leveraging the local build cache.
328349
329- The ‘Build Caching Leverage’ section below reveals the realized and potential
330- savings from build caching. All cacheable goals' outputs need to be taken from
331- the build cache in the second build for the build to be fully cacheable.
350+ $( explain_build_cache_leverage)
332351
333352The ‘Investigation Quick Links’ section below allows quick navigation to the
334353most relevant views in build scans to investigate what goals were avoided due to
@@ -344,8 +363,35 @@ $(print_command_to_repeat_experiment)
344363
345364$( explain_when_to_rerun_experiment)
346365EOF
366+ else
367+ IFS=' ' read -r -d ' ' text << EOF
368+ The ‘Summary’ section below captures the configuration of the experiment. No
369+ build scans are available for inspection since publishing was disabled for the
370+ experiment.
371+
372+ $( explain_build_cache_leverage)
373+
374+ $( explain_command_to_repeat_experiment)
375+
376+ $( print_summary)
377+
378+ $( print_command_to_repeat_experiment)
379+
380+ $( explain_when_to_rerun_experiment)
381+ EOF
382+ fi
347383 print_wizard_text " ${text} "
348384}
349385
386+ explain_build_cache_leverage () {
387+ local text
388+ IFS=' ' read -r -d ' ' text << EOF
389+ The ‘Build Caching Leverage’ section below reveals the realized and potential
390+ savings from build caching. All cacheable goals' outputs need to be taken from
391+ the build cache in the second build for the build to be fully cacheable.
392+ EOF
393+ echo -n " ${text} "
394+ }
395+
350396process_arguments " $@ "
351397main
0 commit comments