Skip to content

Commit b237c87

Browse files
authored
Add script which validates that netty-tcnative versions are in-sync (#11915)
Motivation: We most ensure the netty-tcnative versions between our parent pom and the bom pom are in sync Modifications: Add script and use it during github action run to verify that the versions are the same Result: No more problems due version missmatch
1 parent af708b3 commit b237c87

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
# ----------------------------------------------------------------------------
3+
# Copyright 2021 The Netty Project
4+
#
5+
# The Netty Project licenses this file to you under the Apache License,
6+
# version 2.0 (the "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at:
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
# License for the specific language governing permissions and limitations
15+
# under the License.
16+
# ----------------------------------------------------------------------------
17+
set -e
18+
19+
PARENT_TCNATIVE_VERSION=$(grep "<tcnative.version>" pom.xml | sed -n 's/.*<tcnative.version>\(.*\)<\/tcnative.version>/\1/p')
20+
BOM_TCNATIVE_VERSION=$(grep "<tcnative.version>" bom/pom.xml | sed -n 's/.*<tcnative.version>\(.*\)<\/tcnative.version>/\1/p')
21+
22+
if [ "$PARENT_TCNATIVE_VERSION" != "$BOM_TCNATIVE_VERSION" ]; then
23+
echo "tcnative version missmatch, parent: $PARENT_TCNATIVE_VERSION, bom: $BOM_TCNATIVE_VERSION"
24+
exit 1
25+
fi
26+
exit 0
27+
28+

.github/workflows/ci-build.yml

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ jobs:
7070
- name: Checking for test failures
7171
run: ./.github/scripts/check_build_result.sh build.output
7272

73+
- name: Checking bom dependency versions
74+
run: ./.github/scripts/check_bom_dependencies.sh
75+
7376
- uses: actions/upload-artifact@v2
7477
if: ${{ failure() }}
7578
with:

.github/workflows/ci-pr.yml

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: Verify with Maven
4747
run: ./mvnw -B -ntp --file pom.xml verify -DskipTests=true
4848

49+
- name: Checking bom dependency versions
50+
run: ./.github/scripts/check_bom_dependencies.sh
51+
4952
build-pr-windows:
5053
runs-on: windows-2016
5154
name: windows-x86_64-java11-boringssl

0 commit comments

Comments
 (0)