Skip to content

Commit

Permalink
[FLINK-32834] Add usage information and -h option to low-level scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Aug 17, 2023
1 parent b38cd66 commit ed31bca
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tools/ci/license_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 24 additions & 0 deletions tools/ci/verify_bundled_optional.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 18 additions & 0 deletions tools/ci/verify_scala_suffixes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---"
Expand Down

0 comments on commit ed31bca

Please sign in to comment.