5
5
# `mvn verify ... -D{dependency.name}.version={dependency.version]`. The variables
6
6
# ${dependency.name} and ${dependency.version} are parsed from the input to the script.
7
7
#
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.
14
19
#
15
20
# The default upper-bound dependencies file is `dependencies.txt` located in the root
16
21
# of sdk-platform-java. The upper-bound dependencies file will be in the format of:
17
22
# ${dependency.name}=${dependency.version}
18
- #
19
- # The deps_list is in the format of `dep1=1.0,dep2=2.0`
20
23
21
24
set -ex
22
25
@@ -44,7 +47,7 @@ if [[ -z "${file}" && -z "${dependency_list}" ]]; then
44
47
print_help && exit 1
45
48
fi
46
49
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 "
48
51
49
52
# Check if a list of dependencies was provided as an argument. If the list of dependency inputted
50
53
# is empty, then run with the upper-bound dependencies file
@@ -70,7 +73,7 @@ if [ -z "${dependency_list}" ]; then
70
73
version= $( echo " ${line} " | cut -d' =' -f2 | sed ' s/^[[:space:]]*//;s/[[:space:]]*$//' )
71
74
72
75
# Append the formatted property to the Maven command
73
- MAVEN_COMMAND+= " -D${dependency} =${version} "
76
+ MAVEN_COMMAND+= " -D${dependency} .version =${version} "
74
77
done < " ${UPPER_BOUND_DEPENDENCY_FILE} "
75
78
else # This else block means that a list of dependencies was inputted
76
79
# Set the Internal Field Separator (IFS) to a comma.
0 commit comments