55# `mvn verify ... -D{dependency.name}.version={dependency.version]`. The variables
66# ${dependency.name} and ${dependency.version} are parsed from the input to the script.
77#
8- # There are two inputs to the script:
9- # 1. -f {file}: File for the upper-bound dependencies to test
10- # 2. -l {deps_list}: Comma-separated list of dependencies to test
11- # If both inputs are supplied, the deps_list has precedence. For Github Actions workflow,
12- # the default run will run with the upper-bounds file. A `workflow_dispatch` option takes in
13- # an input for the deps_list to manually run a subset of dependencies
8+ # Default invocation ./.github/scripts/test_dependency_compatibility.sh will use the default
9+ # upper-bounds dependency file at the root of the repo.
10+ # There are two potential inputs to the script:
11+ # 1. -f {file}: Custom file/path for the upper-bound dependencies to test
12+ # 2. -l {deps_list}: Comma-separated list of dependencies to test (e.g. protobuf=4.31.0,guava=33.4.8-jre)
13+ # Note: Do not include the `-D` prefix or `.version` suffix. Those values will be appended when generating
14+ # the maven command.
15+ #
16+ # If both inputs are supplied, the deps_list input has precedence. For Github Actions workflow,
17+ # the default workflow will run with the upper-bounds file. A `workflow_dispatch` option takes in
18+ # an input for the deps_list to manually run a subset of dependencies.
1419#
1520# The default upper-bound dependencies file is `dependencies.txt` located in the root
1621# of sdk-platform-java. The upper-bound dependencies file will be in the format of:
1722# ${dependency.name}=${dependency.version}
18- #
19- # The deps_list is in the format of `dep1=1.0,dep2=2.0`
2023
2124set -ex
2225
@@ -44,7 +47,7 @@ if [[ -z "${file}" && -z "${dependency_list}" ]]; then
4447 print_help && exit 1
4548fi
4649
47- MAVEN_COMMAND=" mvn verify -Penable-integration-tests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip "
50+ MAVEN_COMMAND=" mvn verify -Penable-integration-tests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip -Denforcer.skip "
4851
4952# Check if a list of dependencies was provided as an argument. If the list of dependency inputted
5053# is empty, then run with the upper-bound dependencies file
@@ -70,7 +73,7 @@ if [ -z "${dependency_list}" ]; then
7073 version= $( echo " ${line} " | cut -d' =' -f2 | sed ' s/^[[:space:]]*//;s/[[:space:]]*$//' )
7174
7275 # Append the formatted property to the Maven command
73- MAVEN_COMMAND+= " -D${dependency} =${version} "
76+ MAVEN_COMMAND+= " -D${dependency} .version =${version} "
7477 done < " ${UPPER_BOUND_DEPENDENCY_FILE} "
7578else # This else block means that a list of dependencies was inputted
7679 # Set the Internal Field Separator (IFS) to a comma.
0 commit comments