diff --git a/check_version.sh b/check_version.sh new file mode 100755 index 0000000..216041f --- /dev/null +++ b/check_version.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# +# check_version.sh -- verify the library version is consistent and released. +# +# Read-only: confirms the version matches in both manifests and that a matching +# git tag (vX.Y.Z) exists. Run it before tagging a release. Non-zero exit if the +# versions disagree or the tag is missing. +# +# SPDX-License-Identifier: MIT + +set -u +cd "$(dirname "$0")" || exit 2 + +json=$(sed -nE 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/p' library.json | head -1) +prop=$(sed -nE 's/^version=([^[:space:]]+).*/\1/p' library.properties | tr -d '\r' | head -1) + +echo "library.json : ${json:-}" +echo "library.properties : ${prop:-}" + +fail=0 + +if [ -n "$json" ] && [ "$json" = "$prop" ]; then + echo "ok versions match ($json)" +else + echo "FAIL versions differ (json=$json properties=$prop)"; fail=1 +fi + +if git rev-parse -q --verify "refs/tags/v$json" >/dev/null 2>&1; then + echo "ok git tag v$json exists" +else + echo "FAIL no git tag v$json -- create one to release: git tag v$json"; fail=1 +fi + +exit "$fail" diff --git a/library.json b/library.json index 3b41043..e297c44 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "victronble", - "version": "0.6.0", + "version": "0.6.1", "description": "Portable Arduino library for reading Victron Energy device data via Bluetooth Low Energy (BLE) advertisements. Runs on ESP32, ESP32-S3, ESP32-C3 and nRF52 (nRF52840, nRF52832). Supports SmartSolar MPPT, SmartShunt, BMV, MultiPlus, Orion, Blue Smart AC chargers and other Victron devices. No external crypto dependency.", "keywords": "victron, ble, bluetooth, solar, mppt, battery, smartshunt, smartsolar, bmv, inverter, multiplus, esp32, esp32-s3, esp32-c3, nrf52, nrf52840, nrf52832, xiao, iot, energy, monitoring", "repository": { diff --git a/library.properties b/library.properties index 388c49e..8745d1e 100644 --- a/library.properties +++ b/library.properties @@ -1,11 +1,11 @@ name=VictronBLE -version=0.6.0 +version=0.6.1 author=Scott Penrose maintainer=Scott Penrose sentence=Portable library for reading Victron Energy device data via BLE on ESP32/S3/C3 and nRF52 (nRF52840/nRF52832) paragraph=Read data from Victron SmartSolar, SmartShunt, BMV, inverters, Blue Smart AC chargers and other devices using Bluetooth Low Energy advertisements. Runs on ESP32, ESP32-S3, ESP32-C3 and nRF52 (nRF52840, nRF52832 — Bluefruit or Seeed cores) with no external crypto dependency. Supports multiple devices simultaneously with no pairing required. category=Communication -url=https://gitea.sh3d.com.au/Sh3d/VictronBLE +url=https://github.com/SH3D/VictronBLE architectures=esp32,nrf52 depends= includes=VictronBLE.h