Skip to content

Commit

Permalink
Merge pull request #9 from wubbl0rz/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
wubbl0rz authored Oct 16, 2022
2 parents 5733c14 + 33b8e00 commit 80101b4
Show file tree
Hide file tree
Showing 16 changed files with 455 additions and 84 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- release
tags:
- v[0-9]+\.[0-9]+\.[0-9]+

jobs:
build:
Expand All @@ -17,6 +15,8 @@ jobs:
- arch: "amd64"
rid: "linux-musl-x64"
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -26,7 +26,7 @@ jobs:
dotnet-version: 7.0.x
- name: build_release
run: |
cd TestAddon/App
cd FiatChampAddon/FiatClient
dotnet publish -r ${{ matrix.rid }} --configuration Release --self-contained -o build/
- name: docker_login
uses: docker/login-action@v2.0.0
Expand All @@ -38,6 +38,5 @@ jobs:
uses: home-assistant/builder@2022.09.0
with:
args: |
--test
--${{ matrix.arch }} \
--target TestAddon
--target FiatChampAddon
11 changes: 11 additions & 0 deletions FiatChampAddon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# CHANGELOG

## 2.0.13 - 2022-10-16
- km to miles conversion
- distance sensors export unit of measurement to home assistant (km or mi)
- more fitting icons for some sensors
- obfuscate mail account in log
- fix debug logging

## 2.0.7 - 2022-10-10
- supports remote door locking and unlocking. dangerous command... disabled by default.
- more logging

## 2.0.6 - 2022-10-06
- fixed high memory usage with prebuilt image. as a bonus installation an upgrades should be a lot faster now.

Expand Down
4 changes: 1 addition & 3 deletions FiatChampAddon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
ARG BUILD_FROM
FROM $BUILD_FROM

ARG BUILD_ARCH

RUN apk add icu-libs
RUN apk add icu

COPY run.sh /run.sh
RUN chmod a+x /run.sh

COPY FiatClient/build/$BUILD_ARCH/ /build/.
COPY FiatClient/build/ /build/.

LABEL org.opencontainers.image.source https://github.com/wubbl0rz/FiatChamp

Expand Down
11 changes: 9 additions & 2 deletions FiatChampAddon/FiatClient/AppConfig.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;

namespace FiatChamp;
Expand All @@ -17,20 +18,26 @@ public record AppConfig
public bool AutoRefreshLocation { get; set; } = false;
public bool AutoRefreshBattery { get; set; } = false;
public bool EnableDangerousCommands { get; set; } = false;
public bool ConvertKmToMiles { get; set; } = false;
public bool DevMode { get; set; } = false;
public bool UseFakeApi { get; set; } = false;
public bool Debug { get; set; } = false;

public override string ToString()
public string ToStringWithoutSecrets()
{
var user = this.FiatUser[0..2] + new string('*', this.FiatUser[2..].Length);

var tmp = this with
{
FiatUser = user,
FiatPw = new string('*', this.FiatPw.Length),
MqttPw = new string('*', this.MqttPw.Length),
FiatPin = new string('*', this.FiatPin?.Length ?? 0)
};

return JsonConvert.SerializeObject(tmp, Formatting.Indented);
}

public bool IsPinSet()
{
return !string.IsNullOrWhiteSpace(this.FiatPin);
Expand Down
2 changes: 2 additions & 0 deletions FiatChampAddon/FiatClient/FiatChamp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<PackageReference Include="MQTTnet" Version="4.1.0.247" />
<PackageReference Include="MQTTnet.Extensions.ManagedClient" Version="4.1.0.247" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
</ItemGroup>

</Project>
Loading

0 comments on commit 80101b4

Please sign in to comment.