diff --git a/ci-scripts/kurento_get_version.sh b/ci-scripts/kurento_get_version.sh index 68b46cfa6..1d806d0cb 100755 --- a/ci-scripts/kurento_get_version.sh +++ b/ci-scripts/kurento_get_version.sh @@ -92,9 +92,11 @@ elif [[ -f pom.xml ]]; then if [[ -n "${CFG_MAVEN_SETTINGS_PATH:-}" ]]; then MAVEN_CMD+=(--settings "$CFG_MAVEN_SETTINGS_PATH") fi - # First run, to log all downloading of dependencies. + + log "DRY RUN. Showing Maven logs:" >&2 "${MAVEN_CMD[@]}" >&2 - # Second run, suppressing Maven logs to get just the result. + + log "REAL RUN. Suppressing Maven logs, just get the result:" >&2 MAVEN_CMD+=(--quiet) PROJECT_VERSION="$("${MAVEN_CMD[@]}")" || { log "ERROR: Command failed: mvn echo \${project.version}" >&2 diff --git a/ci-scripts/kurento_maven_deploy_github.sh b/ci-scripts/kurento_maven_deploy_github.sh index 07871a109..73a479811 100644 --- a/ci-scripts/kurento_maven_deploy_github.sh +++ b/ci-scripts/kurento_maven_deploy_github.sh @@ -44,7 +44,7 @@ function delete_github_version { # But the operation is still successful for our intents. We don't want to be # deleting and recreating the whole package, only its excess versions. - log "INFO: Successfully deleted version '${PROJECT_NAME}:${PROJECT_VERSION}' from GitHub." + log "INFO: Finished deleting versions of '${PROJECT_NAME}:${PROJECT_VERSION}' from GitHub." } @@ -64,13 +64,16 @@ mvn "${MVN_ARGS[@]}" install || { MVN_DIRS=() { MAVEN_CMD=(mvn "${MVN_ARGS[@]}" exec:exec -Dexec.executable=pwd) - # First run, to log any error that could happen. - # 2024-05-22: This command was failing on CI. + + # 2024-05-22: This command was failing on CI, and errors were suppressed. + # Adding an initial dry run, to be able to see errors in the output logs. + log "DRY RUN. Showing Maven logs:" "${MAVEN_CMD[@]}" - # Second run, suppressing Maven logs to get just the result. + + log "REAL RUN. Suppressing Maven logs, just get the result:" MAVEN_CMD+=(--quiet) # shellcheck disable=SC2207 - MVN_DIRS=( $("${MAVEN_CMD[@]}") ) || { + MVN_DIRS=($("${MAVEN_CMD[@]}")) || { log "ERROR: Command failed: mvn exec pwd" exit 1 }