|
22 | 22 | required: false |
23 | 23 | default: '' |
24 | 24 | working-directory: |
25 | | - description: Optional additional arguments to specify the directory in which maven build is executed |
| 25 | + description: Optional, comma-separated list of directories in which this version-check is executed |
26 | 26 | type: string |
27 | 27 | required: false |
28 | 28 | default: '.' |
| 29 | + submodules: |
| 30 | + description: | |
| 31 | + Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules. |
| 32 | + When the `ssh-key` input is not provided, SSH URLs beginning with `[email protected]:` are converted to HTTPS. |
| 33 | + The value is just passed as it is to the checkout action: https://github.com/actions/checkout#usage |
| 34 | + type: string |
| 35 | + required: false |
| 36 | + default: 'false' |
29 | 37 |
|
30 | 38 | permissions: {} # all none |
31 | 39 |
|
32 | 40 | env: |
33 | 41 | MAVEN_ARGS: >- |
34 | 42 | --batch-mode --no-transfer-progress |
| 43 | + WORKING_DIRECTORIES: ${{ inputs.working-directory }} |
35 | 44 |
|
36 | 45 | jobs: |
37 | 46 | versions-check-and-increment: |
|
42 | 51 | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
43 | 52 | with: |
44 | 53 | fetch-depth: 0 # required for jgit timestamp provider to work |
| 54 | + submodules: ${{ inputs.submodules }} |
45 | 55 |
|
46 | 56 | - name: Set up Java |
47 | 57 | uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 |
@@ -73,11 +83,14 @@ jobs: |
73 | 83 | with: |
74 | 84 | attempt_delay: 200 |
75 | 85 | attempt_limit: 10 |
76 | | - current_path: ${{ inputs.working-directory }} |
77 | | - command: > |
78 | | - mvn verify ${{ inputs.extra-maven-args }} -DskipTests -Dcompare-version-with-baselines.skip=false |
79 | | - org.eclipse.tycho:tycho-versions-plugin:bump-versions -Dtycho.bump-versions.increment=100 |
80 | | - --update-snapshots --threads 1C --fail-at-end --show-version |
| 86 | + command: | |
| 87 | + for dir in ${WORKING_DIRECTORIES//,/ }; do |
| 88 | + pushd $dir |
| 89 | + mvn verify ${{ inputs.extra-maven-args }} -DskipTests -Dcompare-version-with-baselines.skip=false \ |
| 90 | + org.eclipse.tycho:tycho-versions-plugin:bump-versions -Dtycho.bump-versions.increment=100 \ |
| 91 | + --update-snapshots --threads 1C --fail-at-end --show-version |
| 92 | + popd |
| 93 | + done |
81 | 94 |
|
82 | 95 | - name: Commit version increments, if any |
83 | 96 | run: | |
|
90 | 103 | # Relevant files were staged, i.e. some version were changed |
91 | 104 | |
92 | 105 | # Read 'releaseNumberSDK' property as stream version |
93 | | - pushd ${{ inputs.working-directory }} |
94 | | - mvn help:evaluate -Dexpression=releaseNumberSDK ${{ inputs.extra-maven-args }} --quiet '-Doutput=releaseNumberSDK-value.txt' |
| 106 | + pushd "${WORKING_DIRECTORIES%%,*}" |
| 107 | + mvn help:evaluate -Dexpression=releaseNumberSDK ${{ inputs.extra-maven-args }} --non-recursive --quiet -Doutput=releaseNumberSDK-value.txt |
95 | 108 | streamVersion=$(<releaseNumberSDK-value.txt) |
96 | 109 | rm -f releaseNumberSDK-value.txt |
97 | 110 | popd |
|
0 commit comments