mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-08 18:54:22 -04:00
Build: Cleaning up the build process but breaking windows publish
This commit is contained in:
parent
c44272a098
commit
acf87b2619
@ -2,7 +2,6 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Title>Kyoo.Abstractions</Title>
|
||||
<Authors>Zoe Roux</Authors>
|
||||
<Description>Base package to create plugins for Kyoo.</Description>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<IsPackable>false</IsPackable>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules/**</DefaultItemExcludes>
|
||||
<SpaRoot>Front/</SpaRoot>
|
||||
<NpmStamp>$(SpaRoot)node_modules/.install-stamp</NpmStamp>
|
||||
|
||||
<!-- Set this to true if you enable server-side prerendering -->
|
||||
<BuildServerSideRenderer>false</BuildServerSideRenderer>
|
||||
@ -35,16 +36,20 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="RunWebpack" Condition="'$(SkipWebApp)' != 'true' And '$(CustomRuntime)' != 'true'">
|
||||
<Target Name="NpmInstall" BeforeTargets="RunWebpack" Inputs="$(SpaRoot)/package.json" Outputs="$(NpmStamp)">
|
||||
<Exec Command="node --version" ContinueOnError="true">
|
||||
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
|
||||
</Exec>
|
||||
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
|
||||
|
||||
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
|
||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" Condition="'$(Configuration)' != 'Debug' Or !Exists('$(SpaRoot)node_modules')" />
|
||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" Condition="'$(Configuration)' != 'Debug'" />
|
||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition="'$(Configuration)' != 'Debug' And '$(BuildServerSideRenderer)' == 'true'" />
|
||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
|
||||
<Touch Files="$(NpmStamp)" AlwaysCreate="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RunWebpack" Condition="'$(SkipWebApp)' != 'true' And '$(Configuration)' == 'Debug'">
|
||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
|
||||
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition="'$(BuildServerSideRenderer)' == 'true'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CopyFrontEndFiles" AfterTargets="RunWebpack" BeforeTargets="GetCopyToOutputDirectoryItems" Condition="'$(Configuration)' != 'Debug'">
|
||||
@ -66,6 +71,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<BuildDependsOn>
|
||||
NpmInstall;
|
||||
RunWebpack;
|
||||
$(BuildDependsOn)
|
||||
</BuildDependsOn>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../Kyoo/Kyoo.csproj" Properties="CustomRuntime=true;SelfContainedValue=$(SelfContained);RuntimeIdentifierValue=$(RuntimeIdentifier)" />
|
||||
<ProjectReference Include="../Kyoo/Kyoo.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -20,4 +20,4 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -11,11 +11,6 @@
|
||||
<LangVersion>default</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$(CustomRuntime) == true">
|
||||
<SelfContained>$(SelfContainedValue)</SelfContained>
|
||||
<RuntimeIdentifier>$(RuntimeIdentifierValue)</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
|
||||
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
|
||||
@ -50,7 +45,7 @@
|
||||
<ProjectReference Include="../Kyoo.Postgresql/Kyoo.Postgresql.csproj" />
|
||||
<ProjectReference Include="../Kyoo.SqLite/Kyoo.SqLite.csproj" />
|
||||
<ProjectReference Include="../Kyoo.Authentication/Kyoo.Authentication.csproj" />
|
||||
<ProjectReference Include="../Kyoo.WebApp/Kyoo.WebApp.csproj" Properties="CustomRuntime=$(CustomRuntime)" />
|
||||
<ProjectReference Include="../Kyoo.WebApp/Kyoo.WebApp.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="BuildTranscoder" BeforeTargets="BeforeBuild" Condition="'$(SkipTranscoder)' != 'true' And !Exists('$(TranscoderRoot)/build/$(TranscoderBinary)')">
|
||||
|
Loading…
x
Reference in New Issue
Block a user