Browse Source

Merge branch 'main' into inference

pull/165/head
Ionite 1 year ago committed by GitHub
parent
commit
cb032e72de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .config/.csharpierrc.json
  2. 8
      .config/dotnet-tools.json
  3. 21
      .github/workflows/release.yml
  4. 4
      CHANGELOG.md
  5. 2
      StabilityMatrix.Avalonia.Diagnostics/LogViewer/DataStoreLoggerTarget.cs
  6. 2
      StabilityMatrix.Avalonia.Diagnostics/LogViewer/Extensions/ServicesExtension.cs
  7. 9
      StabilityMatrix.Avalonia/Assets.cs
  8. 6
      StabilityMatrix.Avalonia/Program.cs
  9. 6
      StabilityMatrix.Avalonia/ViewModels/Dialogs/UpdateViewModel.cs

4
.config/.csharpierrc.json

@ -0,0 +1,4 @@
{
"printWidth": 120,
"preprocessorSymbolSets": ["", "DEBUG", "DEBUG,CODE_STYLE"]
}

8
.config/dotnet-tools.json

@ -13,6 +13,12 @@
"commands": [
"xstyler"
]
},
"csharpier": {
"version": "0.25.0",
"commands": [
"dotnet-csharpier"
]
}
}
}
}

21
.github/workflows/release.yml

@ -1,5 +1,8 @@
name: Release
permissions:
contents: write
on:
workflow_dispatch:
inputs:
@ -82,20 +85,7 @@ jobs:
path: ${{ env.out-name }}
- name: Create Sentry release
if: ${{ github.event_name == 'release' || github.event.inputs.sentry-release == 'true' }}
uses: getsentry/action-release@v1
env:
MAKE_SENTRY_RELEASE: ${{ secrets.SENTRY_PROJECT != '' }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
ignore_missing: true
version: StabilityMatrix.Avalonia@${{ env.GIT_TAG_NAME }}
- name: Create Sentry release
if: ${{ github.event_name == 'workflow_dispatch' }}
if: ${{ github.event.inputs.sentry-release == 'true' }}
uses: getsentry/action-release@v1
env:
MAKE_SENTRY_RELEASE: ${{ secrets.SENTRY_PROJECT != '' }}
@ -105,8 +95,9 @@ jobs:
with:
environment: production
ignore_missing: true
ignore_empty: true
version: StabilityMatrix.Avalonia@${{ github.event.inputs.version }}
release-windows:
name: Release (win-x64)

4
CHANGELOG.md

@ -5,6 +5,10 @@ All notable changes to Stability Matrix will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
## v2.3.4
### Fixed
- Fixed [#108](https://github.com/LykosAI/StabilityMatrix/issues/108) - (Linux) Fixed permission error on updates [#103](https://github.com/LykosAI/StabilityMatrix/pull/103)
## v2.3.3
### Fixed
- Fixed GPU recognition for Nvidia Tesla GPUs

2
StabilityMatrix.Avalonia.Diagnostics/LogViewer/DataStoreLoggerTarget.cs

@ -67,8 +67,6 @@ public class DataStoreLoggerTarget : TargetWithLayout
Exception = logEvent.Exception?.Message ?? (logLevel == MsLogLevel.Error ? message : ""),
Color = _config!.Colors[logLevel],
});
Debug.WriteLine($"--- [{logLevel.ToString()[..3]}] {message} - {logEvent.Exception?.Message ?? "no error"}");
}
#endregion

2
StabilityMatrix.Avalonia.Diagnostics/LogViewer/Extensions/ServicesExtension.cs

@ -15,7 +15,7 @@ public static class ServicesExtension
{
public static IServiceCollection AddLogViewer(this IServiceCollection services)
{
services.AddSingleton<ILogDataStore, LogDataStore>();
services.AddSingleton<ILogDataStore>(Core.Logging.LogDataStore.Instance);
services.AddSingleton<LogViewerControlViewModel>();
return services;

9
StabilityMatrix.Avalonia/Assets.cs

@ -31,6 +31,11 @@ internal static class Assets
public static AvaloniaResource ThemeMatrixDarkJson =>
new("avares://StabilityMatrix.Avalonia/Assets/ThemeMatrixDark.json");
private const UnixFileMode unix755 = UnixFileMode.UserRead | UnixFileMode.UserWrite |
UnixFileMode.UserExecute | UnixFileMode.GroupRead |
UnixFileMode.GroupExecute | UnixFileMode.OtherRead |
UnixFileMode.OtherExecute;
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
@ -38,9 +43,9 @@ internal static class Assets
(PlatformKind.Windows,
new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/win-x64/7za.exe")),
(PlatformKind.Linux | PlatformKind.X64,
new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/linux-x64/7zzs", (UnixFileMode) 0777)),
new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/linux-x64/7zzs", unix755)),
(PlatformKind.MacOS | PlatformKind.Arm,
new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/macos-arm64/7zz", (UnixFileMode) 0x777)));
new AvaloniaResource("avares://StabilityMatrix.Avalonia/Assets/macos-arm64/7zz", unix755)));
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]

6
StabilityMatrix.Avalonia/Program.cs

@ -112,7 +112,11 @@ public class Program
// Ensure permissions are set for unix
if (Compat.IsUnix)
{
File.SetUnixFileMode(targetExe, (UnixFileMode) 0x755);
File.SetUnixFileMode(targetExe, // 0755
UnixFileMode.UserRead | UnixFileMode.UserWrite |
UnixFileMode.UserExecute | UnixFileMode.GroupRead |
UnixFileMode.GroupExecute | UnixFileMode.OtherRead |
UnixFileMode.OtherExecute);
}
// Start the new app

6
StabilityMatrix.Avalonia/ViewModels/Dialogs/UpdateViewModel.cs

@ -97,7 +97,11 @@ public partial class UpdateViewModel : ContentDialogViewModelBase
// On unix, we need to set the executable bit
if (Compat.IsUnix)
{
File.SetUnixFileMode(UpdateHelper.ExecutablePath, (UnixFileMode) 0x755);
File.SetUnixFileMode(UpdateHelper.ExecutablePath, // 0755
UnixFileMode.UserRead | UnixFileMode.UserWrite |
UnixFileMode.UserExecute | UnixFileMode.GroupRead |
UnixFileMode.GroupExecute | UnixFileMode.OtherRead |
UnixFileMode.OtherExecute);
}
UpdateText = "Update complete. Restarting Stability Matrix in 3 seconds...";

Loading…
Cancel
Save