tweaks + automatic packaging
Some checks failed
Build .deb on release / Build-Deb (push) Failing after 49s
Some checks failed
Build .deb on release / Build-Deb (push) Failing after 49s
This commit is contained in:
parent
41c9cdafaf
commit
571010c07c
28
.gitea/workflows/deb.yaml
Normal file
28
.gitea/workflows/deb.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
name: Build .deb on release
|
||||||
|
run-name: Building .deb of latest release and adding to apt repo
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build-Deb:
|
||||||
|
runs-on: aarch64
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Build
|
||||||
|
run: "cargo build --release --target=aarch64-unknown-linux-gnu"
|
||||||
|
- name: Build .deb
|
||||||
|
run: "cargo deb --target=aarch64-unknown-linux-gnu"
|
||||||
|
- name: Add .deb to apt repository
|
||||||
|
run: "curl --user alex:${{ secrets.PACKAGING_TOKEN }} --upload-file $(ls -t ./target/aarch64-unknown-linux-gnu/debian/*.deb | head -1) https://git.alexjanka.com/api/packages/alex/debian/pool/testing/main/upload"
|
||||||
|
- name: "Release package"
|
||||||
|
id: use-go-action
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
./target/aarch64-unknown-linux-gnu/debian/*.deb
|
||||||
|
./target/aarch64-unknown-linux-gnu/release/homekit-exporter
|
||||||
|
api_key: "${{secrets.PACKAGING_TOKEN}}"
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1155,7 +1155,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "homekit-controller"
|
name = "homekit-controller"
|
||||||
version = "0.6.4"
|
version = "0.6.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chacha20poly1305",
|
"chacha20poly1305",
|
||||||
"ed25519-dalek",
|
"ed25519-dalek",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "homekit-controller"
|
name = "homekit-controller"
|
||||||
version = "0.6.4"
|
version = "0.6.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
description = "Partial implementation of the HomeKit controller protocol"
|
description = "Partial implementation of the HomeKit controller protocol"
|
||||||
|
|
|
@ -438,24 +438,6 @@ pub enum HomekitError {
|
||||||
NoData,
|
NoData,
|
||||||
}
|
}
|
||||||
|
|
||||||
trait FlattenResult {
|
|
||||||
type T;
|
|
||||||
type E;
|
|
||||||
fn flatten_result(self) -> Result<Self::T, Self::E>;
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<T, E> FlattenResult for Result<Result<T, E>, E> {
|
|
||||||
type T = T;
|
|
||||||
type E = E;
|
|
||||||
|
|
||||||
fn flatten_result(self) -> Result<Self::T, Self::E> {
|
|
||||||
match self {
|
|
||||||
Ok(v) => v,
|
|
||||||
Err(e) => Err(e),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
pub enum ConnectionError {
|
pub enum ConnectionError {
|
||||||
#[error("http")]
|
#[error("http")]
|
||||||
|
|
|
@ -158,7 +158,7 @@ pub struct ServiceCharacteristic {
|
||||||
|
|
||||||
impl ServiceCharacteristic {
|
impl ServiceCharacteristic {
|
||||||
pub fn update_from(&mut self, other: &ServiceCharacteristic) {
|
pub fn update_from(&mut self, other: &ServiceCharacteristic) {
|
||||||
self.value = other.value.clone();
|
self.value.clone_from(&other.value);
|
||||||
if other.event_notifications_enabled.is_some() {
|
if other.event_notifications_enabled.is_some() {
|
||||||
self.event_notifications_enabled = other.event_notifications_enabled;
|
self.event_notifications_enabled = other.event_notifications_enabled;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue