From ef4a9dffeb3004a51b89e72330bd309a875f58e3 Mon Sep 17 00:00:00 2001 From: Chris Vest Date: Fri, 9 Sep 2022 10:45:15 -0700 Subject: [PATCH] Maven must run in batch mode when listing staged releases Motivation: We're grepping the output of the command, and terminal color codes get in the way of that. Modification: Ask maven to run in batch mode, to prevent colored output. Result: The list_staged_release.sh script no longer fails to find any staged releases in the maven output. --- scripts/list_staged_release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/list_staged_release.sh b/scripts/list_staged_release.sh index 2ae3b5adc88..9ec582dce77 100755 --- a/scripts/list_staged_release.sh +++ b/scripts/list_staged_release.sh @@ -16,6 +16,6 @@ # ---------------------------------------------------------------------------- set -e -RC_LIST=$(mvn org.sonatype.plugins:nexus-staging-maven-plugin:rc-list -DserverId=sonatype-nexus-staging -DnexusUrl=https://oss.sonatype.org | grep -A 2 "\[INFO\] ID State Description") +RC_LIST=$(mvn -B org.sonatype.plugins:nexus-staging-maven-plugin:rc-list -DserverId=sonatype-nexus-staging -DnexusUrl=https://oss.sonatype.org | grep -A 2 "\[INFO\] ID State Description") STAGED=$(echo "$RC_LIST" | grep 'OPEN' | cut -f 2 -d ' ') echo "$STAGED"