This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit ed31bca4c9efb89ad7b0a2242d51360ab5188e35
Author: Chesnay Schepler <ches...@apache.org>
AuthorDate: Tue Aug 15 17:57:29 2023 +0200

    [FLINK-32834] Add usage information and -h option to low-level scripts
---
 tools/ci/license_check.sh           | 26 ++++++++++++++++++++++++++
 tools/ci/verify_bundled_optional.sh | 24 ++++++++++++++++++++++++
 tools/ci/verify_scala_suffixes.sh   | 18 ++++++++++++++++++
 3 files changed, 68 insertions(+)

diff --git a/tools/ci/license_check.sh b/tools/ci/license_check.sh
index 4f2aebbde00..f31a6665061 100755
--- a/tools/ci/license_check.sh
+++ b/tools/ci/license_check.sh
@@ -17,6 +17,32 @@
 # limitations under the License.
 
################################################################################
 
+usage() {
+  echo "Usage: $0 <maven-build-output> <deployed-artifacts-folder>"
+  echo "    <maven-build-output>                 A file containing the output 
of the Maven build."
+  echo "    <deployed-artifacts-folder>          A directory containing a 
Maven repository into which the Flink artifacts were deployed."
+  echo ""
+  echo "Example preparation:"
+  echo "    mvnw clean deploy 
-DaltDeploymentRepository=validation_repository::default::file:<deployed-artifacts-folder>
 > <maven-build-output>"
+  echo ""
+  echo "The environment variable MVN is used to specify the Maven binaries; 
defaults to 'mvnw'."
+  echo "See further details in the JavaDoc of LicenseChecker."
+}
+
+while getopts 'h' o; do
+  case "${o}" in
+    h)
+      usage
+      exit 0
+      ;;
+  esac
+done
+
+if [[ "$#" != "2" ]]; then
+  usage
+  exit 1
+fi
+
 MVN_CLEAN_COMPILE_OUT=$1
 FLINK_DEPLOYED_ROOT=$2
 
diff --git a/tools/ci/verify_bundled_optional.sh 
b/tools/ci/verify_bundled_optional.sh
index 34fff60ca2d..0d3dbdf41ba 100755
--- a/tools/ci/verify_bundled_optional.sh
+++ b/tools/ci/verify_bundled_optional.sh
@@ -17,6 +17,30 @@
 # limitations under the License.
 #
 
+usage() {
+  echo "Usage: $0 <maven-build-output>"
+  echo "    <maven-build-output>                 A file containing the output 
of the Maven build."
+  echo ""
+  echo "mvnw clean package > <maven-build-output>"
+  echo ""
+  echo "The environment variable MVN is used to specify the Maven binaries; 
defaults to 'mvnw'."
+  echo "See further details in the JavaDoc of ShadeOptionalChecker."
+}
+
+while getopts 'h' o; do
+  case "${o}" in
+    h)
+      usage
+      exit 0
+      ;;
+  esac
+done
+
+if [[ "$#" != "1" ]]; then
+  usage
+  exit 1
+fi
+
 ## Checks that all bundled dependencies are marked as optional in the poms
 MVN_CLEAN_COMPILE_OUT=$1
 
diff --git a/tools/ci/verify_scala_suffixes.sh 
b/tools/ci/verify_scala_suffixes.sh
index 4c5cc389eb3..45fca80a842 100755
--- a/tools/ci/verify_scala_suffixes.sh
+++ b/tools/ci/verify_scala_suffixes.sh
@@ -37,6 +37,24 @@
 #
 # The script uses 'mvn dependency:tree -Dincludes=org.scala-lang' to list Scala
 # dependent modules.
+
+
+usage() {
+  echo "Usage: $0"
+  echo ""
+  echo "The environment variable MVN is used to specify the Maven binaries; 
defaults to 'mvnw'."
+  echo "See further details in the JavaDoc of ScalaSuffixChecker."
+}
+
+while getopts 'h' o; do
+  case "${o}" in
+    h)
+      usage
+      exit 0
+      ;;
+  esac
+done
+
 MVN=${MVN:-./mvnw}
 
 echo "--- Flink Scala Dependency Analyzer ---"

Reply via email to