check version before release

This commit is contained in:
2026-06-08 17:14:39 +10:00
parent 712259eec5
commit cc8c4d36d5
3 changed files with 37 additions and 3 deletions
+34
View File
@@ -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:-<none>}"
echo "library.properties : ${prop:-<none>}"
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"
+1 -1
View File
@@ -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": {
+2 -2
View File
@@ -1,11 +1,11 @@
name=VictronBLE
version=0.6.0
version=0.6.1
author=Scott Penrose
maintainer=Scott Penrose <scottp@dd.com.au>
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