Skip to content

Commit

Permalink
Seperate local install & publish
Browse files Browse the repository at this point in the history
  • Loading branch information
elzik committed Sep 23, 2023
1 parent b87eae2 commit 65de49e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
13 changes: 13 additions & 0 deletions Build/local-install.ps1
Original file line number Diff line number Diff line change
@@ -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'
13 changes: 8 additions & 5 deletions Build/publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
}

0 comments on commit 65de49e

Please sign in to comment.