diff --git a/CHANGES b/CHANGES index 875e8b2..4d57bd4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +Version 1.11.0 2022-12-29 + Version 1.11.0-RC2 2022-12-29 Improve release process. diff --git a/README.md b/README.md index f50002e..6ea71f8 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ depending on if you are running as a daemon or not. # Running without config files, good for experimentation and test. ``` -wmbusmeters version: 1.10.1 +wmbusmeters version: 1.11.0 Usage: wmbusmeters {options} [device] { [meter_name] [meter_driver] [meter_id] [meter_key] }* wmbusmeters {options} [hex] { [meter_name] [meter_driver] [meter_id] [meter_key] }* wmbusmetersd {options} [pid_file] diff --git a/ha-addon/config.json b/ha-addon/config.json index b64a047..91a86e9 100755 --- a/ha-addon/config.json +++ b/ha-addon/config.json @@ -1,6 +1,6 @@ { "name": "Wmbusmeters (W-MBus to MQTT)", - "version": "1.10.2", + "version": "1.11.0", "slug": "wmbusmeters", "description": "Acquire utility meter readings using the wireless mbus protocol (WMBUS)", "arch": ["armv7", "aarch64", "amd64"], diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 1842f85..c747f59 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -34,13 +34,20 @@ PATCH=$(echo "$PARTS" | cut -f 3 -d ' ') NEW_VERSION="$MAJOR.$MINOR.$PATCH" +if git tag | grep -q "^${NEW_VERSION}\$" +then + echo "Oups! The new version tag $NEW_VERSION already exists!" + exit 0 +fi + NEW_MESSAGE="Version $NEW_VERSION $(date +'%Y-%m-%d')" PREV_GIT_MESSAGE=$(git log -1 --pretty=%B) -if [ "PREV_GIT_MESSAGE" != "$OLD_MESSAGE" ] +if [ "$PREV_GIT_MESSAGE" != "$OLD_MESSAGE" ] then - echo "Oups! Something is wrong in the git log. Expected last commit to say \"$OLD_MESSAGE\" but it does not!" + echo "Oups! Something is wrong in the git log." + echo "Expected last commit to say \"$OLD_MESSAGE\" but it doesn't, it says: \"$PREV_GIT_MESSAGE\"" exit 0 fi @@ -59,17 +66,22 @@ while true; do esac done -sed 's/"version": "[\.0-9]*"/"version": "'$NEW_VERSION'"/' ha-addon/config.json > /tmp/release_haconfig +# Update the ha-addon version number. This will trigger rebuilds at ha installs with auto-update. +CMD="s/\"version\": \"[\.0-9]*\"/\"version\": \"${NEW_VERSION}\"/" +sed -i "$CMD" ha-addon/config.json echo "Updated version number in ha-addon/config.json to $NEW_VERSION" -sed "s/$OLD_MESSAGE/$NEW_MESSAGE/" CHANGES > /tmp/release_changes +# Update the CHANGES file +CMD="1i $NEW_MESSAGE" +sed -i "$CMD" CHANGES echo "Updated version string in CHANGES" +CMD="s/wmbusmeters version:.*/wmbusmeters version: $NEW_VERSION/g" +sed -i "$CMD" README.md +echo "Updated version string in README" + git commit -am "$NEW_MESSAGE" git tag "$NEW_VERSION" -echo "Now do: git push ; git push --tags" - -#git push -#git push --tags +echo "Now do: git push --followtags" diff --git a/scripts/release.sh b/scripts/release.sh index a50f84f..d1ca2aa 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -77,14 +77,11 @@ while true; do done # Insert release candidate line in CHANGES. -CMD="1i $MESSAGE" +CMD="1i $MESSAGE\n" sed -i "$CMD" CHANGES git commit -am "$MESSAGE" git tag "$RC_VERSION" -echo "Now do: git push ; git push --tags" - -#git push -#git push --tags +echo "Now do: git push --followtags"