File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8888 needs : build
8989 uses : ./.github/workflows/rpminspect-test.yml
9090
91- update- version-test :
92- name : Update Version
93- uses : ./.github/workflows/update- version-test.yml
91+ version-test :
92+ name : Version
93+ uses : ./.github/workflows/version-test.yml
Original file line number Diff line number Diff line change 1- name : Update Version
1+ name : Version
22
33on :
44 workflow_call :
1010 env :
1111 SHARED : /tmp/workdir/pki
1212 steps :
13+ - name : Install dependencies
14+ run : |
15+ sudo apt-get update
16+ sudo apt-get -y install xmlstarlet
17+
1318 - name : Clone repository
1419 uses : actions/checkout@v7
1520
21+ - name : Get version number from RPM spec
22+ run : |
23+ MAJOR_VERSION=$(sed -n 's/^%global *major_version *\(.*\)$/\1/p' pki.spec)
24+ MINOR_VERSION=$(sed -n 's/^%global *minor_version *\(.*\)$/\1/p' pki.spec)
25+ UPDATE_VERSION=$(sed -n 's/^%global *update_version *\(.*\)$/\1/p' pki.spec)
26+
27+ VERSION=$MAJOR_VERSION.$MINOR_VERSION.$UPDATE_VERSION
28+ echo "VERSION=$VERSION" | tee -a $GITHUB_ENV
29+
30+ - name : Check version numbers in pom.xml
31+ run : |
32+ echo -n "$VERSION-SNAPSHOT" > expected
33+
34+ for filename in $(find . -name pom.xml); do
35+ echo "Checking version number in $filename"
36+
37+ if [ "$filename" == "./pom.xml" ]; then
38+ xmlstarlet sel -t -v '/_:project/_:version' $filename > actual
39+ else
40+ xmlstarlet sel -t -v '/_:project/_:parent/_:version' $filename > actual
41+ fi
42+
43+ diff expected actual
44+ done
45+
1646 - name : Setup git
1747 run : |
1848 sudo apt-get update
You can’t perform that action at this time.
0 commit comments