Skip to content

Commit

Permalink
Ensure platform specific config is set after publish
Browse files Browse the repository at this point in the history
  • Loading branch information
elzik committed Mar 14, 2024
1 parent eb96d3c commit 1d20dce
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Build/build-windows-installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $repoRootPath = (Resolve-Path "$PSScriptRoot/../").Path
Import-Module $(Resolve-Path "$repoRootPath/Build/Test-ExitCode.psm1")

dotnet publish $repoRootPath\src\Elzik.FmSync.Worker\Elzik.FmSync.Worker.csproj `
--verbosity normal `
--runtime win-x64 `
--self-contained true `
--configuration Release `
Expand All @@ -13,6 +14,7 @@ dotnet publish $repoRootPath\src\Elzik.FmSync.Worker\Elzik.FmSync.Worker.csproj
Test-ExitCode

dotnet publish $repoRootPath\src\Elzik.FmSync.Console\Elzik.FmSync.Console.csproj `
--verbosity normal `
--runtime win-x64 `
--self-contained true `
--configuration Release `
Expand All @@ -21,6 +23,7 @@ dotnet publish $repoRootPath\src\Elzik.FmSync.Console\Elzik.FmSync.Console.cspro
Test-ExitCode

dotnet build $repoRootPath\Installer\Elzik.FmSync.WindowsInstaller\Elzik.FmSync.WindowsInstaller.wixproj `
--verbosity normal `
--runtime win-x64 `
--self-contained true `
--configuration Release `
Expand Down
5 changes: 3 additions & 2 deletions Elzik.FmSync.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{0FE56BA0-BDDF-4291-9BDD-A6D512610FAE}"
ProjectSection(SolutionItems) = preProject
Build\build-and-test.ps1 = Build\build-and-test.ps1
Build\build-windows-installer.ps1 = Build\build-windows-installer.ps1
Build\build-osx-installer.ps1 = Build\build-osx-installer.ps1
Build\build-windows-installer.ps1 = Build\build-windows-installer.ps1
.github\workflows\continuous-delivery.yml = .github\workflows\continuous-delivery.yml
Build\local-pipeline.ps1 = Build\local-pipeline.ps1
Test-ExitCode.psm1 = Test-ExitCode.psm1
Build\set-platform-specific-config.ps1 = Build\set-platform-specific-config.ps1
Build\Test-ExitCode.psm1 = Build\Test-ExitCode.psm1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Installer", "Installer", "{069FD2C8-3AFB-4D61-A19A-3257331FC223}"
Expand Down
6 changes: 5 additions & 1 deletion src/Elzik.FmSync.Console/Elzik.FmSync.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="PowerShell -NoProfile -ExecutionPolicy unrestricted -file $(ProjectDir)/../../Build/set-platform-specific-config.ps1 $(OutDir) $(OS)" />
<Exec Command="PowerShell -NoProfile -ExecutionPolicy unrestricted -file $(ProjectDir)../../Build/set-platform-specific-config.ps1 $(OutDir) $(OS)" />
</Target>

<Target Name="PostPublish" AfterTargets="Publish">
<Exec Command="PowerShell -NoProfile -ExecutionPolicy unrestricted -file $(ProjectDir)../../Build/set-platform-specific-config.ps1 $(PublishDir) $(OS)" />
</Target>

</Project>
6 changes: 5 additions & 1 deletion src/Elzik.FmSync.Worker/Elzik.FmSync.Worker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="PowerShell -NoProfile -ExecutionPolicy unrestricted -file $(ProjectDir)/../../Build/set-platform-specific-config.ps1 $(OutDir) $(OS)" />
<Exec Command="PowerShell -NoProfile -ExecutionPolicy unrestricted -file $(ProjectDir)../../Build/set-platform-specific-config.ps1 $(OutDir) $(OS)" />
</Target>

<Target Name="PostPublish" AfterTargets="Publish">
<Exec Command="PowerShell -NoProfile -ExecutionPolicy unrestricted -file $(ProjectDir)../../Build/set-platform-specific-config.ps1 $(PublishDir) $(OS) " />
</Target>

</Project>

0 comments on commit 1d20dce

Please sign in to comment.