Skip to content

Commit c4c9f0b

Browse files
committed
Check if xml and C header version are in sync
pecl package-verify doesn't seem to run this test, but pecl.php.net does. I don't know of a standard way to do it, so reinvent the wheel here.
1 parent cf5320a commit c4c9f0b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ jobs:
9090
php run-tests.php -P --show-diff tests
9191
- name: Verify package
9292
run: pecl package-validate
93+
- name: Verify XML and header version are in sync
94+
# pecl.php.org runs a similar test, but pecl package-validate doesn't,
95+
# reinvent the wheel here
96+
run: |
97+
XML_VERSION=$(pecl info package.xml | perl -ne "m/^Release Version *([\\.0-9a-z]*) .*$/ && print \"\$1\\n\"" -)
98+
echo "package.xml version is \"$XML_VERSION\""
99+
HEADER_VERSION=$(perl -ne "m/^#define.*PHP_IBM_DB2_VERSION.*\"(.*)\"$/ && print \"\$1\\n\"" php_ibm_db2.h)
100+
echo "php_ibm_db2.h version is \"$HEADER_VERSION\""
101+
test "$HEADER_VERSION" = "$XML_VERSION"
93102
windows:
94103
defaults:
95104
run:

0 commit comments

Comments
 (0)