Move creation of GoogleBloggerv3Secrets.json into writer.build.targets
There was an issue around the first time the project built, the JSON file was not getting included into the project because it hadn't been generated yet. Moving the creation of the JSON file into a centralized writer.build.targets fixed this.
This commit is contained in:
parent
24c97bbb4a
commit
1a963eaf0a
|
@ -203,6 +203,7 @@
|
|||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Clients\PassportSettings.xml" />
|
||||
<EmbeddedResource Include="Clients\GoogleBloggerv3Secrets.json" />
|
||||
<EmbeddedResource Include="Images\WordPressFav.ico" />
|
||||
<EmbeddedResource Include="Providers\BlogProvidersB5.xml" />
|
||||
<Content Include="Detection\default.htm" />
|
||||
|
@ -215,17 +216,6 @@
|
|||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(RepoRoot)\writer.build.targets" />
|
||||
<PropertyGroup>
|
||||
<BloggerClientSecretsJson>Clients\GoogleBloggerv3Secrets.json</BloggerClientSecretsJson>
|
||||
<OlwBloggerClientId Condition="'$(OlwBloggerClientId)'==''">ClientId</OlwBloggerClientId>
|
||||
<OlwBloggerClientSecret Condition="'$(OlwBloggerClientSecret)'==''">ClientSecret</OlwBloggerClientSecret>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Condition="Exists('$(BloggerClientSecretsJson)')" Include="$(BloggerClientSecretsJson)" />
|
||||
</ItemGroup>
|
||||
<Target Name="GenerateBloggerClientSecrets" DependsOnTargets="ResolveProjectReferences" BeforeTargets="CoreCompile" Outputs="$(BloggerClientSecretsJson)">
|
||||
<WriteLinesToFile File="$(BloggerClientSecretsJson)" Lines="{ "installed": { "client_id": "$(OlwBloggerClientId)", "client_secret": "$(OlwBloggerClientSecret)" } }" Overwrite="true" />
|
||||
</Target>
|
||||
<Target Name="BeforeBuild">
|
||||
<Copy SourceFiles="$(ProjectDir)Detection\default.htm" DestinationFiles="$(OutputPath)\template\default.htm" />
|
||||
<Copy SourceFiles="$(ProjectDir)Detection\defaultstyle.css" DestinationFiles="$(OutputPath)\template\defaultstyle.css" />
|
||||
|
|
|
@ -20,4 +20,16 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!-- Google Blogger -->
|
||||
|
||||
<PropertyGroup>
|
||||
<BloggerClientSecretsJson>$(RepoRoot)\src\managed\OpenLiveWriter.BlogClient\Clients\GoogleBloggerv3Secrets.json</BloggerClientSecretsJson>
|
||||
<OlwBloggerClientId Condition="'$(OlwBloggerClientId)'==''">PASTE_YOUR_CLIENT_ID_HERE</OlwBloggerClientId>
|
||||
<OlwBloggerClientSecret Condition="'$(OlwBloggerClientSecret)'==''">PASTE_YOUR_CLIENT_SECRET_HERE</OlwBloggerClientSecret>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateBloggerClientSecrets" BeforeTargets="CoreCompile" Outputs="$(BloggerClientSecretsJson)">
|
||||
<WriteLinesToFile File="$(BloggerClientSecretsJson)" Lines="{ "installed": { "client_id": "$(OlwBloggerClientId)", "client_secret": "$(OlwBloggerClientSecret)" } }" Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
Loading…
Reference in New Issue