Skip to content

Commit

Permalink
Merge pull request #5 from bars43ru/application-build
Browse files Browse the repository at this point in the history
setting up application build
  • Loading branch information
bars43ru authored Aug 4, 2020
2 parents 5fb2dff + 6749210 commit 777eb7c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/src/bin
/src/obj
/src/settings.json
/src/Properties
/src/Gps2Yandex.csproj.user
20 changes: 15 additions & 5 deletions src/Gps2Yandex.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.4" />
</ItemGroup>

<ItemGroup>
<None Update="settings.json.sample">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="FileCopyAfterBuild" AfterTargets="AfterBuild">
<Copy SourceFiles="settings.json.sample" DestinationFiles="$(OutDir)settings.json" Condition="!Exists('$(OutDir)settings.json')" />
<MakeDir Directories="$(OutDir)source" Condition="!Exists('$(OutDir)source')" />
<Copy SourceFiles="SourceSample\route.txt.sample" DestinationFiles="$(OutDir)source\route.txt" Condition="!Exists('$(OutDir)source\route.txt')" />
<Copy SourceFiles="SourceSample\schedule.txt.sample" DestinationFiles="$(OutDir)source\schedule.txt" Condition="!Exists('$(OutDir)source\schedule.txt')" />
<Copy SourceFiles="SourceSample\transport.txt.sample" DestinationFiles="$(OutDir)source\transport.txt" Condition="!Exists('$(OutDir)source\transport.txt')" />
</Target>

<Target Name="SettingsFileCopyPublish" AfterTargets="CopyFilesToPublishDirectory">
<Copy SourceFiles="settings.json.sample" DestinationFiles="$(PublishDir)settings.json" />
<MakeDir Directories="$(PublishDir)source" />
<Copy SourceFiles="SourceSample\route.txt.sample" DestinationFiles="$(PublishDir)source\route.txt" />
<Copy SourceFiles="SourceSample\schedule.txt.sample" DestinationFiles="$(PublishDir)source\schedule.txt" />
<Copy SourceFiles="SourceSample\transport.txt.sample" DestinationFiles="$(PublishDir)source\transport.txt" />
</Target>

</Project>
2 changes: 1 addition & 1 deletion src/settings.json.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Catalogs": {
"Directory": "Z:\\"
"Directory": ".\\source\\"
},
"WialonListen": {
"Host": "0.0.0.0",
Expand Down

0 comments on commit 777eb7c

Please sign in to comment.