diff --git a/bump_version.sh b/bump_version.sh old mode 100644 new mode 100755 index be2e801..d325104 --- a/bump_version.sh +++ b/bump_version.sh @@ -1,5 +1,12 @@ #!/bin/bash current_version=$(git describe --tags --abbrev=0) +cp library.json.skeleton library.json +while ifs= read -r line; do + name=$(echo "$line" | sed "s/=.*//g") + value=$(echo "$line" | cut -d= -f 2 | sed 's/"//g') + sed -i "s/#$name/$value/g" library.json +done < library.properties + if [ "$1" == "" ]; then echo echo "Syntax: $0 {new_version}" @@ -16,13 +23,16 @@ else grep $current_version library.properties if [ "$?" == "0" ]; then sed -i "s/$current_version/$1/" library.properties - sed -i "s/$current_version/$1/" library.json - git tag $1 - git add library.properties - git add library.json - git commit -m "Release $1" - git push - git push --tags + if [ 0 == 1 ]; then + git tag $1 + git add library.properties + git add library.json + git commit -m "Release $1" + git push + git push --tags + else + echo "No git operation made" + fi else echo "Current version does not match library.property version, aborting" fi diff --git a/library.json b/library.json new file mode 100644 index 0000000..0d90d1a --- /dev/null +++ b/library.json @@ -0,0 +1,18 @@ +{ + "name": "TinyMqtt", + "keywords": "ethernet, mqtt, m2m, iot", + "description": "MQTT is a lightweight messaging protocol. This library allows to host a broker or to use a mqtt client in your ESP 8266 or 32 WROOM. It does support MQTT 3.1.1 with QoS", + "repository": { + "type": "git", + "url": "https://github.com/hsaturn/TinyMqtt.git" + }, + "version": "0.9.15", + "exclude": "", + "examples": "examples/*/*.ino", + "frameworks": "arduino", + "platforms": [ + "atmelavr", + "espressif8266", + "espressif32" + ] +} diff --git a/library.json.skeleton b/library.json.skeleton new file mode 100644 index 0000000..78b634a --- /dev/null +++ b/library.json.skeleton @@ -0,0 +1,18 @@ +{ + "name": "#name", + "keywords": "ethernet, mqtt, m2m, iot", + "description": "#paragraph", + "repository": { + "type": "git", + "url": "https://github.com/hsaturn/TinyMqtt.git" + }, + "version": "#version", + "exclude": "", + "examples": "examples/*/*.ino", + "frameworks": "arduino", + "platforms": [ + "atmelavr", + "espressif8266", + "espressif32" + ] +} diff --git a/library.properties b/library.properties index 402962b..62aebba 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TinyMqtt -version=0.9.15 +version=0.9.16 author=Francois BIOT, HSaturn, maintainer=Francois BIOT sentence=A tiny broker and client library for MQTT messaging.