diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index a8388c73..6663ce8d 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -181,7 +181,7 @@ jobs: -Dartifactory.publish.artifacts=false \ -B $VERBOSE echo "::notice ::checking updated versions" - $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} + $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} ${{ (github.debug || inputs.verbose) }} popd >/dev/null - name: 'Action: build initial dependencies' shell: bash @@ -303,7 +303,7 @@ jobs: -Dartifactory.publish.artifacts=false \ -B $VERBOSE echo "::notice ::checking updated versions" - $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} + $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} ${{ (github.debug || inputs.verbose) }} popd >/dev/null - name: 'Configure: Docker login' uses: docker/login-action@v2 @@ -401,7 +401,7 @@ jobs: -Dartifactory.publish.artifacts=false \ -B $VERBOSE echo "::notice ::checking updated versions" - $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} + $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} ${{ (github.debug || inputs.verbose) }} popd >/dev/null - name: 'Configure: Docker login' uses: docker/login-action@v2 @@ -501,7 +501,7 @@ jobs: -Dartifactory.publish.artifacts=false \ -B $VERBOSE echo "::notice ::checking updated versions" - $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} + $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} ${{ (github.debug || inputs.verbose) }} popd >/dev/null - name: 'Configure: Docker login' uses: docker/login-action@v2 @@ -595,7 +595,7 @@ jobs: -Dartifactory.publish.artifacts=false \ -B $VERBOSE echo "::notice ::checking updated versions" - $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} + $ROOT_DIR/check-versions-for-release.sh ${{ needs.parameters.outputs.build_version_type }} ${{ (github.debug || inputs.verbose) }} popd >/dev/null - name: 'Build: stream-applications-release-train' shell: bash diff --git a/check-versions-for-release.sh b/check-versions-for-release.sh index a41e1b6e..2bf78f79 100755 --- a/check-versions-for-release.sh +++ b/check-versions-for-release.sh @@ -5,6 +5,7 @@ if [ "$1" == "" ]; then exit 1 fi RELEASE_TYPE="$1" +VERBOSE="$2" set +e @@ -13,6 +14,9 @@ if [ "$RELEASE_TYPE" = "milestone" ]; then lines=$(find . -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex | wc -l) if [ $lines -ne 0 ]; then echo "Snapshots found ($lines)check-versions-for-release.sh. Exiting the release build." + if [ "$VERBOSE" = "true" ]; then + echo $(find . -type f -name pom.xml | xargs grep SNAPSHOT | grep -v ".contains(" | grep -v regex) + fi exit 1 fi elif [ "$RELEASE_TYPE" = "ga" ]; then @@ -20,6 +24,9 @@ elif [ "$RELEASE_TYPE" = "ga" ]; then lines=$(find . -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex | wc -l) if [ $lines -ne 0 ]; then echo "Non release versions found ($lines). Exiting build" + if [ "$VERBOSE" = "true" ]; then + echo $(find . -type f -name pom.xml | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v ".contains(" | grep -v regex) + fi exit 1 fi else