mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
!minor made the build a lot faster and also fixed the issue where we did not include the webpack files
This commit is contained in:
parent
2b5e5282bd
commit
e0c2492987
3 changed files with 19 additions and 67 deletions
|
@ -19,15 +19,6 @@ after_build:
|
||||||
appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\src\Ombi\bin\Release\netcoreapp2.0\osx.tar.gz"
|
appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\src\Ombi\bin\Release\netcoreapp2.0\osx.tar.gz"
|
||||||
|
|
||||||
|
|
||||||
appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\src\Ombi\bin\Release\netcoreapp2.0\ubuntu.tar.gz"
|
|
||||||
|
|
||||||
|
|
||||||
appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\src\Ombi\bin\Release\netcoreapp2.0\debian.tar.gz"
|
|
||||||
|
|
||||||
|
|
||||||
appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\src\Ombi\bin\Release\netcoreapp2.0\centos.tar.gz"
|
|
||||||
|
|
||||||
|
|
||||||
appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\src\Ombi\bin\Release\netcoreapp2.0\linux.tar.gz"
|
appveyor PushArtifact "%APPVEYOR_BUILD_FOLDER%\src\Ombi\bin\Release\netcoreapp2.0\linux.tar.gz"
|
||||||
|
|
||||||
|
|
||||||
|
|
60
build.cake
60
build.cake
|
@ -43,9 +43,6 @@ var publishSettings = new DotNetCorePublishSettings
|
||||||
var artifactsFolder = buildDir + "/netcoreapp2.0/";
|
var artifactsFolder = buildDir + "/netcoreapp2.0/";
|
||||||
var windowsArtifactsFolder = artifactsFolder + "win10-x64/published";
|
var windowsArtifactsFolder = artifactsFolder + "win10-x64/published";
|
||||||
var osxArtifactsFolder = artifactsFolder + "osx-x64/published";
|
var osxArtifactsFolder = artifactsFolder + "osx-x64/published";
|
||||||
var ubuntuArtifactsFolder = artifactsFolder + "ubuntu-x64/published";
|
|
||||||
var debianArtifactsFolder = artifactsFolder + "debian.8-x64/published";
|
|
||||||
var centosArtifactsFolder = artifactsFolder + "centos.7-x64/published";
|
|
||||||
var linuxArtifactsFolder = artifactsFolder + "linux-x64/published";
|
var linuxArtifactsFolder = artifactsFolder + "linux-x64/published";
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,7 +104,7 @@ Task("SetVersionInfo")
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("NPM")
|
Task("NPM")
|
||||||
.Does(() => {
|
.Does(() => {
|
||||||
var settings = new NpmInstallSettings {
|
var settings = new NpmInstallSettings {
|
||||||
LogLevel = NpmLogLevel.Silent,
|
LogLevel = NpmLogLevel.Silent,
|
||||||
WorkingDirectory = webProjDir,
|
WorkingDirectory = webProjDir,
|
||||||
|
@ -118,6 +115,7 @@ Task("NPM")
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Gulp Publish")
|
Task("Gulp Publish")
|
||||||
|
.IsDependentOn("NPM")
|
||||||
.Does(() => {
|
.Does(() => {
|
||||||
|
|
||||||
var runScriptSettings = new NpmRunScriptSettings {
|
var runScriptSettings = new NpmRunScriptSettings {
|
||||||
|
@ -129,7 +127,6 @@ Task("Gulp Publish")
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("TSLint")
|
Task("TSLint")
|
||||||
.IsDependentOn("NPM")
|
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
var settings = new NpmRunScriptSettings {
|
var settings = new NpmRunScriptSettings {
|
||||||
|
@ -140,38 +137,24 @@ Task("TSLint")
|
||||||
NpmRunScript(settings);
|
NpmRunScript(settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Restore")
|
Task("PrePublish")
|
||||||
.IsDependentOn("SetVersionInfo")
|
.IsDependentOn("SetVersionInfo")
|
||||||
.IsDependentOn("TSLint")
|
|
||||||
.IsDependentOn("Gulp Publish")
|
.IsDependentOn("Gulp Publish")
|
||||||
.Does(() =>
|
.IsDependentOn("TSLint");
|
||||||
{
|
|
||||||
DotNetCoreRestore(projDir);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
Task("Build")
|
|
||||||
.IsDependentOn("Restore")
|
|
||||||
.Does(() =>
|
|
||||||
{
|
|
||||||
DotNetCoreBuild(csProj, buildSettings);
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("Package")
|
Task("Package")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
Zip(windowsArtifactsFolder +"/",artifactsFolder + "windows.zip");
|
Zip(windowsArtifactsFolder +"/",artifactsFolder + "windows.zip");
|
||||||
GZipCompress(osxArtifactsFolder, artifactsFolder + "osx.tar.gz");
|
GZipCompress(osxArtifactsFolder, artifactsFolder + "osx.tar.gz");
|
||||||
GZipCompress(ubuntuArtifactsFolder, artifactsFolder + "ubuntu.tar.gz");
|
|
||||||
GZipCompress(debianArtifactsFolder, artifactsFolder + "debian.tar.gz");
|
|
||||||
GZipCompress(centosArtifactsFolder, artifactsFolder + "centos.tar.gz");
|
|
||||||
GZipCompress(linuxArtifactsFolder, artifactsFolder + "linux.tar.gz");
|
GZipCompress(linuxArtifactsFolder, artifactsFolder + "linux.tar.gz");
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Publish")
|
Task("Publish")
|
||||||
.IsDependentOn("Build")
|
.IsDependentOn("PrePublish")
|
||||||
.IsDependentOn("Publish-Windows")
|
.IsDependentOn("Publish-Windows")
|
||||||
.IsDependentOn("Publish-OSX").IsDependentOn("Publish-Ubuntu").IsDependentOn("Publish-Debian").IsDependentOn("Publish-Centos").IsDependentOn("Publish-Linux")
|
.IsDependentOn("Publish-OSX").IsDependentOn("Publish-Linux")
|
||||||
.IsDependentOn("Package");
|
.IsDependentOn("Package");
|
||||||
|
|
||||||
Task("Publish-Windows")
|
Task("Publish-Windows")
|
||||||
|
@ -196,37 +179,6 @@ Task("Publish-OSX")
|
||||||
DotNetCorePublish("./src/Ombi.Updater/Ombi.Updater.csproj", publishSettings);
|
DotNetCorePublish("./src/Ombi.Updater/Ombi.Updater.csproj", publishSettings);
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Publish-Ubuntu")
|
|
||||||
.Does(() =>
|
|
||||||
{
|
|
||||||
publishSettings.Runtime = "ubuntu-x64";
|
|
||||||
publishSettings.OutputDirectory = Directory(buildDir) + Directory("netcoreapp2.0/ubuntu-x64/published");
|
|
||||||
|
|
||||||
DotNetCorePublish("./src/Ombi/Ombi.csproj", publishSettings);
|
|
||||||
CopyFile(buildDir + "/netcoreapp2.0/ubuntu-x64/Swagger.xml", buildDir + "/netcoreapp2.0/ubuntu-x64/published/Swagger.xml");
|
|
||||||
DotNetCorePublish("./src/Ombi.Updater/Ombi.Updater.csproj", publishSettings);
|
|
||||||
});
|
|
||||||
Task("Publish-Debian")
|
|
||||||
.Does(() =>
|
|
||||||
{
|
|
||||||
publishSettings.Runtime = "debian.8-x64";
|
|
||||||
publishSettings.OutputDirectory = Directory(buildDir) + Directory("netcoreapp2.0/debian.8-x64/published");
|
|
||||||
|
|
||||||
DotNetCorePublish("./src/Ombi/Ombi.csproj", publishSettings);
|
|
||||||
CopyFile(buildDir + "/netcoreapp2.0/debian.8-x64/Swagger.xml", buildDir + "/netcoreapp2.0/debian.8-x64/published/Swagger.xml");
|
|
||||||
DotNetCorePublish("./src/Ombi.Updater/Ombi.Updater.csproj", publishSettings);
|
|
||||||
});
|
|
||||||
Task("Publish-Centos")
|
|
||||||
.Does(() =>
|
|
||||||
{
|
|
||||||
publishSettings.Runtime = "centos.7-x64";
|
|
||||||
publishSettings.OutputDirectory = Directory(buildDir) + Directory("netcoreapp2.0/centos.7-x64/published");
|
|
||||||
|
|
||||||
DotNetCorePublish("./src/Ombi/Ombi.csproj", publishSettings);
|
|
||||||
CopyFile(buildDir + "/netcoreapp2.0/centos.7-x64/Swagger.xml", buildDir + "/netcoreapp2.0/centos.7-x64/published/Swagger.xml");
|
|
||||||
DotNetCorePublish("./src/Ombi.Updater/Ombi.Updater.csproj", publishSettings);
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("Publish-Linux")
|
Task("Publish-Linux")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,15 @@
|
||||||
<None Remove="wwwroot\dist\**" />
|
<None Remove="wwwroot\dist\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="RunWebpack" AfterTargets="ComputeFilesToPublish">
|
||||||
|
<ItemGroup>
|
||||||
|
<DistFiles Include="wwwroot\dist\**" />
|
||||||
|
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
|
||||||
|
<RelativePath>%(DistFiles.Identity)</RelativePath>
|
||||||
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
|
</ResolvedFileToPublish>
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue