From 65de49e79c160fa9d8b3ea38df1036ade3aed3fd Mon Sep 17 00:00:00 2001 From: elzik <23397871+elzik@users.noreply.github.com> Date: Sat, 23 Sep 2023 19:48:47 +0100 Subject: [PATCH] Seperate local install & publish --- Build/local-install.ps1 | 13 +++++++++++++ Build/publish.ps1 | 13 ++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 Build/local-install.ps1 diff --git a/Build/local-install.ps1 b/Build/local-install.ps1 new file mode 100644 index 0000000..2ef68dc --- /dev/null +++ b/Build/local-install.ps1 @@ -0,0 +1,13 @@ +# Install console app +robocopy $PSScriptRoot\output\Elzik.FmSync.Console\win-x64 "c:\program files\fmsync\console" /e + +# Install worker service +Stop-Service -Name 'fmsync' +Remove-Service -Name 'fmsync' + +robocopy $PSScriptRoot\output\Elzik.FmSync.Worker\win-x64 "c:\program files\fmsync\worker" /e + +New-Service -Name 'fmsync' ` + -BinaryPathName 'c:\program files\fmsync\worker\Elzik.FmSync.Worker.exe' ` + -StartupType Automatic +Start-Service -Name 'fmsync' \ No newline at end of file diff --git a/Build/publish.ps1 b/Build/publish.ps1 index f1e717d..00cb163 100644 --- a/Build/publish.ps1 +++ b/Build/publish.ps1 @@ -6,10 +6,13 @@ foreach ($runtime in $runtimes) -r $runtime ` --self-contained true ` -c Release ` - -o $PSScriptRoot\output\$runtime ` + -o $PSScriptRoot\output\Elzik.FmSync.Worker\$runtime ` -p:PublishSingleFile=true -} -robocopy $PSScriptRoot\output\win-x64 "c:\program files\fmsync" /e -robocopy $PSScriptRoot\output\win-x64 "\\TOWER\Applications\fmsync\win-x64" /e -robocopy $PSScriptRoot\output\osx-x64 "\\TOWER\Applications\fmsync\osx-x64" /e \ No newline at end of file + dotnet publish $PSScriptRoot\..\src\Elzik.FmSync.Console\Elzik.FmSync.Console.csproj ` + -r $runtime ` + --self-contained true ` + -c Release ` + -o $PSScriptRoot\output\Elzik.FmSync.Console\$runtime ` + -p:PublishSingleFile=true +}