[FLINK-32834] Add usage information and -h option to low-level scripts

pull/23234/head
Chesnay Schepler 1 year ago
parent b38cd662bc
commit ed31bca4c9

@ -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

@ -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

@ -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 ---"

Loading…
Cancel
Save