Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84d30b6343 | ||
|
|
f38cc536b8 | ||
|
|
f498995aee | ||
|
|
8e44e610b3 |
@@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
current_version=$(git describe --tags --abbrev=0)
|
current_version=$(git describe --tags --abbrev=0)
|
||||||
|
|
||||||
|
function error
|
||||||
|
{
|
||||||
|
echo
|
||||||
|
echo "ERROR *** $1"
|
||||||
|
}
|
||||||
if [ "$1" == "-d" ]; then
|
if [ "$1" == "-d" ]; then
|
||||||
do=0
|
do=0
|
||||||
shift
|
shift
|
||||||
@@ -15,9 +21,14 @@ if [ "$1" == "" ]; then
|
|||||||
echo " Current version: $current_version"
|
echo " Current version: $current_version"
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
|
tm=$(git status --porcelain -- src/TinyMqtt.h | wc -l)
|
||||||
echo "Current version: ($current_version)"
|
echo "Current version: ($current_version)"
|
||||||
echo "New version : ($1)"
|
echo "New version : ($1)"
|
||||||
echo "Take info from : library.properties"
|
echo "Take info from : library.properties"
|
||||||
|
if [ "$tm" == "1" ]; then
|
||||||
|
error "You cannot bump version if TinyMqtt.h is modified"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
echo -n "Do you want to proceed ? "
|
echo -n "Do you want to proceed ? "
|
||||||
read a
|
read a
|
||||||
if [ "$a" == "y" ]; then
|
if [ "$a" == "y" ]; then
|
||||||
@@ -25,6 +36,7 @@ else
|
|||||||
grep $current_version library.properties
|
grep $current_version library.properties
|
||||||
if [ "$?" == "0" ]; then
|
if [ "$?" == "0" ]; then
|
||||||
sed -i "s/$current_version/$1/" library.properties
|
sed -i "s/$current_version/$1/" library.properties
|
||||||
|
sed -i "s/#define TINY_MQTT_REVISION/#define TINY_MQTT_REVISION \"$1\"/" src/TinyMqtt.h
|
||||||
|
|
||||||
cp library.json.skeleton library.json
|
cp library.json.skeleton library.json
|
||||||
while ifs= read -r line; do
|
while ifs= read -r line; do
|
||||||
@@ -48,15 +60,15 @@ else
|
|||||||
sed -i "s/'/\"/g" library.json
|
sed -i "s/'/\"/g" library.json
|
||||||
if [ "$do" == "1" ]; then
|
if [ "$do" == "1" ]; then
|
||||||
echo "Pushing all"
|
echo "Pushing all"
|
||||||
git commit -m "Release $1 $2"
|
|
||||||
git tag $1
|
|
||||||
git add library.properties
|
git add library.properties
|
||||||
git add library.json
|
git add library.json
|
||||||
|
git commit -m "Release $1 $2"
|
||||||
|
git tag $1
|
||||||
git push
|
git push
|
||||||
git push --tags
|
git push --tags
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Current version does not match library.property version, aborting"
|
error "Current version does not match library.property version, aborting"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies":
|
"dependencies":
|
||||||
{ "hsaturn/TinyConsole" : "*" },
|
{ "hsaturn/TinyConsole" : "*" },
|
||||||
"version": "1.1.0",
|
"version": "1.1.4",
|
||||||
"exclude": "",
|
"exclude": "",
|
||||||
"examples": "examples/*/*.ino",
|
"examples": "examples/*/*.ino",
|
||||||
"frameworks": "arduino",
|
"frameworks": "arduino",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name=TinyMqtt
|
name=TinyMqtt
|
||||||
version=1.1.0
|
version=1.1.4
|
||||||
author=Francois BIOT, HSaturn, <hsaturn@gmail.com>
|
author=Francois BIOT, HSaturn, <hsaturn@gmail.com>
|
||||||
maintainer=Francois BIOT <hsaturn@gmail.com>
|
maintainer=Francois BIOT <hsaturn@gmail.com>
|
||||||
sentence=A tiny broker and client library for MQTT messaging.
|
sentence=A tiny broker and client library for MQTT messaging.
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// vim: ts=2 sw=2 expandtab
|
// vim: ts=2 sw=2 expandtab
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define TINY_MQTT_REVISION "1.1.3"
|
||||||
|
|
||||||
#ifndef TINY_MQTT_DEBUG
|
#ifndef TINY_MQTT_DEBUG
|
||||||
#define TINY_MQTT_DEBUG 0
|
#define TINY_MQTT_DEBUG 0
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user