3 Commits

Author SHA1 Message Date
60a3ec4dc7 Добавлена настройка пути updater.exe
All checks were successful
CI / build-test (push) Successful in 28s
Release / pack-and-publish (release) Successful in 29s
2025-11-25 08:28:30 +03:00
fb83e2d060 ci
All checks were successful
CI / build-test (push) Successful in 30s
2025-11-25 08:19:37 +03:00
a5055f7f26 readme
Some checks failed
CI / build-test (push) Failing after 36s
2025-11-25 08:18:07 +03:00
3 changed files with 10 additions and 9 deletions

View File

@@ -20,14 +20,14 @@ jobs:
dotnet-version: |
8.0.x
- name: Restore
run: dotnet restore
- name: Restore ReleaseUpdater
run: dotnet restore ReleaseUpdater
- name: Build
run: dotnet build --no-restore -c Release
- name: Build ReleaseUpdater
run: dotnet build ReleaseUpdater --no-restore -c Release
- name: Test
run: dotnet test --no-build -c Release --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx"
- name: Test ReleaseUpdater
run: dotnet test ReleaseUpdater --no-build -c Release --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test-results.trx"
- name: Upload test results
if: always()

View File

@@ -1,4 +1,5 @@
# Updater
![Workflow](https://git.frigat.duckdns.org/FrigaT/ReleaseUpdater/actions/workflows/release-package.yaml/badge.svg?branch=master&style=flat)
## 📖 Описание
`Updater` — это инструмент для безопасного обновления приложений.

View File

@@ -72,7 +72,7 @@ public static class ReleaseUpdaterFacade
/// Обновление через внешний Updater.exe.
/// </summary>
public static async Task UpdateWithExternalAsync(
string apiUrl, string? token, string installPath, string appExe, string versionOrLatest = "latest")
string apiUrl, string? token, string installPath, string appExe, string versionOrLatest = "latest", string? updaterExePath = null)
{
try
{
@@ -88,12 +88,12 @@ public static class ReleaseUpdaterFacade
BeforeInstall?.Invoke();
var updaterExe = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updater.exe");
if (updaterExePath == null) updaterExePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updater.exe");
var args = $"--zip \"{zipPath}\" --installPath \"{installPath}\" --appExe \"{appExe}\"";
var process = Process.Start(new ProcessStartInfo
{
FileName = updaterExe,
FileName = updaterExePath,
Arguments = args,
UseShellExecute = true,
WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory