2019-06-20 07:17:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
echo "
|
|
|
|
|
|
|
|
Checking Syncthing Version is compatible
|
|
|
|
-----------------------------
|
|
|
|
"
|
|
|
|
|
|
|
|
NEW_VERSION_NAME=$1
|
|
|
|
if [[ -z ${NEW_VERSION_NAME} ]]
|
|
|
|
then
|
|
|
|
echo "New version name is empty. Please set a new version. Current version: $OLD_VERSION_NAME"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "syncthing/src/github.com/syncthing/syncthing/"
|
|
|
|
CURRENT_TAG=$(git describe)
|
2019-06-27 05:15:20 +00:00
|
|
|
if [ "${NEW_VERSION_NAME#${CURRENT_TAG#v}}" = "${NEW_VERSION_NAME}" ]; then
|
2019-06-20 07:17:34 +00:00
|
|
|
printf "New version name %s is not compatible with Syncthing version %s\n" \
|
|
|
|
"$NEW_VERSION_NAME" "$CURRENT_TAG"
|
|
|
|
exit 1
|
|
|
|
fi
|