-
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update changelog, package.xml and add simple script for validating re…
…lease
- Loading branch information
Showing
4 changed files
with
92 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
# | ||
# Simple shell script to validate releases | ||
# | ||
|
||
EXTNUM=$(grep PHP_IMAGICK_EXTNUM php_imagick.h | awk '{print $3'}) | ||
echo "php_imagick.h EXTNUM: $EXTNUM" | ||
|
||
REL_VERSION=$(xpath package.xml 'string(/package/version/release)' 2>/dev/null) | ||
API_VERSION=$(xpath package.xml 'string(/package/version/api)' 2>/dev/null) | ||
|
||
echo "package.xml release version: ${REL_VERSION}" | ||
echo "package.xml api version: ${API_VERSION}" | ||
|
||
REL_STABILITY=$(xpath package.xml 'string(/package/stability/release)' 2>/dev/null) | ||
API_STABILITY=$(xpath package.xml 'string(/package/stability/api)' 2>/dev/null) | ||
|
||
echo "package.xml release stability: ${REL_STABILITY}" | ||
echo "package.xml api stability: ${API_STABILITY}" | ||
|
||
echo "" | ||
echo "Validation results: " | ||
|
||
if test "${REL_STABILITY}" = "beta"; then | ||
$(echo ${REL_VERSION} | egrep -i 'b|rc' >/dev/null 2>&1) | ||
|
||
if test $? != 0; then | ||
echo "Error: release is marked 'beta' but version doesn't include b or RC"; | ||
exit 1; | ||
fi | ||
fi | ||
|
||
EXTNUM_FROM_PKG_XML=$(echo $REL_VERSION | gsed 's/^\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' | awk -F . '{ printf ("%d%02d%02d", $1, $2, $3); }') | ||
|
||
if test $EXTNUM_FROM_PKG_XML != $EXTNUM; then | ||
echo "Error: package.xml and php_imagick.h EXTNUM mismatch" | ||
exit 1 | ||
fi | ||
|
||
|
||
|
||
if test "${REL_STABILITY}" != "${API_STABILITY}"; then | ||
echo "Warning: API and release stability differ"; | ||
fi |