Skip to content

Commit

Permalink
Maven must run in batch mode when listing staged releases
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chrisvest committed Sep 9, 2022
1 parent f9f1535 commit ef4a9df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/list_staged_release.sh
Expand Up @@ -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"

0 comments on commit ef4a9df

Please sign in to comment.