mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-26 12:41:22 +03:00
scripts/api-version-bump.sh: require explicit version parameter
To avoid accidentally changing the API version, the script now aborts if no new version other than the current API version has been specified.
This commit is contained in:
1 parent
d9ecb04a99
commit
8efab74066
1 file changed
+6
-1
@@ -6,7 +6,12 @@ if ! test -f configure.ac; then
|
||||
fi
|
||||
|
||||
declare $(sed -ne '/^LIBCOAP_API_VERSION=[0-9]\+/{p; q}' configure.ac)
|
||||
NEW_VERSION=${1:-$((LIBCOAP_API_VERSION + 1))}
|
||||
NEW_VERSION=${1:-$LIBCOAP_API_VERSION}
|
||||
|
||||
if test "x$NEW_VERSION" = "x$LIBCOAP_API_VERSION"; then
|
||||
>&2 echo "no version change requested, exiting (current version is $LIBCOAP_API_VERSION)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo $(basename $0): increase version $LIBCOAP_API_VERSION to $NEW_VERSION
|
||||
|
||||
|
||||
Reference in new issue
Block a user