Multiple fixes, had to bump the version because I messed up a release to Pypi.

This commit is contained in:
Kevin Dewald 2025-04-26 00:23:12 -07:00
parent 65508500e2
commit f38ba02dbe
5 changed files with 35 additions and 8 deletions

View File

@ -16,10 +16,15 @@ runs:
# Check if the current commit is tagged
if ! git describe --exact-match --tags HEAD >/dev/null 2>&1; then
# Get the number of commits since the last version bump
commits=$(git rev-list --count "$(git log -1 --format=%H -- VERSION)"..HEAD)
if [ "$commits" -gt 0 ]; then
# Append the dev suffix
version_str="${version_str}.dev$((commits - 1))"
latest_tag=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$latest_tag" ]; then
commits=$(git rev-list --count "${latest_tag}"..HEAD)
# Since HEAD is not tagged and latest_tag exists, commits > 0. Append the dev suffix.
version_str="${version_str}.dev${commits}"
else
# If no tags found, exit with error
echo "Error: No tags found in the repository history." >&2
exit 1
fi
fi

View File

@ -117,7 +117,7 @@ jobs:
config:
- { runner-os: ubuntu-22.04, os: linux, architecture: x64, container-image: dockcross/linux-x64 }
- { runner-os: macos-14, os: macos, architecture: x64 } # Containers are not required.
# - { runner-os: windows-2022, os: windows, architecture: x64 } # Containers are not required. # TODO: https://github.com/fmtlib/fmt/issues/3540
- { runner-os: windows-2022, os: windows, architecture: x64 } # Containers are not required. # TODO: https://github.com/fmtlib/fmt/issues/3540
steps:
- name: Clone Repository

View File

@ -1 +1 @@
0.10.0
0.10.1

View File

@ -6,12 +6,18 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_, and this project adheres to `Semantic Versioning`_.
[0.10.0] - XXXX-XX-XX
[0.10.1] - XXXX-XX-XX
--------------------
**Notes**
- iOS, MacOS and Android do not support powering on and off the adapter. Calling these methods will not have any effect on the adapter.
- Linux does have support for powering on and off the adapter, but further architecture changes are needed to properly expose this.
**Added**
-
- (Windows) Added support for powering on and off the adapter.
- (Python) Exposed the `Adapter::power_on()`, `Adapter::power_off()` and `Adapter::is_powered()` methods.
**Changed**
@ -26,6 +32,7 @@ The format is based on `Keep a Changelog`_, and this project adheres to `Semanti
--------------------
**Important:**
- In the near future we will deprecate the `simpleble-c` target in favor of `simplecble`, which will be a drop-in replacement for the existing C bindings.
- The `simpleble-bridge` project has been renamed to `simpledroidbridge` and can be found in the root directory of the repository.

View File

@ -30,6 +30,18 @@ constexpr auto kDocsAdapterAddress = R"pbdoc(
Address of the adapter
)pbdoc";
constexpr auto kDocsAdapterPowerOn = R"pbdoc(
Power on the adapter
)pbdoc";
constexpr auto kDocsAdapterPowerOff = R"pbdoc(
Power off the adapter
)pbdoc";
constexpr auto kDocsAdapterIsPowered = R"pbdoc(
Whether the adapter is powered
)pbdoc";
constexpr auto kDocsAdapterScanStart = R"pbdoc(
Start scanning for peripherals
)pbdoc";
@ -78,6 +90,9 @@ void wrap_adapter(py::module& m) {
.def("initialized", &SimpleBLE::Adapter::initialized, kDocsAdapterInitialized)
.def("identifier", &SimpleBLE::Adapter::identifier, kDocsAdapterIdentifier)
.def("address", &SimpleBLE::Adapter::address, kDocsAdapterAddress)
.def("power_on", &SimpleBLE::Adapter::power_on, kDocsAdapterPowerOn)
.def("power_off", &SimpleBLE::Adapter::power_off, kDocsAdapterPowerOff)
.def("is_powered", &SimpleBLE::Adapter::is_powered, kDocsAdapterIsPowered)
.def("scan_start", &SimpleBLE::Adapter::scan_start, kDocsAdapterScanStart)
.def("scan_stop", &SimpleBLE::Adapter::scan_stop, kDocsAdapterScanStop)
.def("scan_is_active", &SimpleBLE::Adapter::scan_is_active, kDocsAdapterScanIsActive)