mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-21 23:32:27 +00:00
Fixed: Don't fail build on test failure (#173)
* Fixed: Don't fail build on test failure This sets Appveyor up to use the original build.sh and test.sh scripts. Enables tests for Travis Add frontend linting checks to Appveyor builds Add Failed Tests message to Appveyor builds Fix windows installer naming Fix a few UI issues causing eslint and stylelint to fail * fixup! forgot one ui fix. * fixup! Inno doesn't like appveyor appending string to pr version * fixup! It's too late, my brain is mush
This commit is contained in:
parent
422b82da3c
commit
99d0421ba7
15 changed files with 169 additions and 607 deletions
|
@ -8,7 +8,7 @@ addons:
|
||||||
script:
|
script:
|
||||||
- ./build.sh
|
- ./build.sh
|
||||||
- chmod +x test.sh
|
- chmod +x test.sh
|
||||||
# - ./test.sh Linux Unit Takes far too long, maybe even crashes travis :/
|
- ./test.sh Linux Unit
|
||||||
after_success:
|
after_success:
|
||||||
- chmod +x package.sh
|
- chmod +x package.sh
|
||||||
- ./package.sh
|
- ./package.sh
|
||||||
|
|
27
appveyor-package.sh
Normal file
27
appveyor-package.sh
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
artifactsFolder="./_artifacts";
|
||||||
|
artifactsFolderWindows=$artifactsFolder/windows
|
||||||
|
artifactsFolderLinux=$artifactsFolder/linux
|
||||||
|
artifactsFolderMacOS=$artifactsFolder/macos
|
||||||
|
artifactsFolderMacOSApp=$artifactsFolder/macos-app
|
||||||
|
|
||||||
|
PublishArtifacts()
|
||||||
|
{
|
||||||
|
7z a $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.windows.zip $artifactsFolderWindows/*
|
||||||
|
|
||||||
|
7z a $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx-app.zip $artifactsFolderMacOSApp/*
|
||||||
|
|
||||||
|
7z a -ttar $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar $artifactsFolderMacOS/*
|
||||||
|
7z a -tgzip $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar.gz $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar
|
||||||
|
rm -f $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.osx.tar
|
||||||
|
|
||||||
|
7z a -ttar $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar $artifactsFolderLinux/*
|
||||||
|
7z a -tgzip $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar.gz $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar
|
||||||
|
rm -f $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.linux.tar
|
||||||
|
|
||||||
|
./setup/inno/ISCC.exe "./setup/lidarr.iss"
|
||||||
|
cp ./setup/output/Lidarr.*windows.exe $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.windows.exe
|
||||||
|
}
|
||||||
|
|
||||||
|
PublishArtifacts
|
22
appveyor.yml
22
appveyor.yml
|
@ -14,20 +14,16 @@ install:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- ps: ./build-appveyor.ps1
|
- C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./build.sh
|
||||||
|
|
||||||
|
after_build:
|
||||||
|
- C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./appveyor-package.sh
|
||||||
|
- ps: Get-ChildItem .\_artifacts\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||||
|
- ps: Get-ChildItem .\_artifacts\*.exe | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||||
|
- ps: Get-ChildItem .\_artifacts\*.tar.gz | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
|
||||||
|
|
||||||
test:
|
test_script:
|
||||||
assemblies:
|
- C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./test.sh Windows Unit
|
||||||
- '_tests\*Test.dll'
|
|
||||||
categories:
|
|
||||||
except:
|
|
||||||
- IntegrationTest
|
|
||||||
- AutomationTest
|
|
||||||
|
|
||||||
artifacts:
|
|
||||||
- path: '_artifacts\*.zip'
|
|
||||||
- path: '_artifacts\*.exe'
|
|
||||||
- path: '_artifacts\*.tar.gz'
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- '%USERPROFILE%\.nuget\packages'
|
- '%USERPROFILE%\.nuget\packages'
|
||||||
|
|
|
@ -1,314 +0,0 @@
|
||||||
#addin "Cake.Npm"
|
|
||||||
#addin "Cake.Yarn"
|
|
||||||
#addin "SharpZipLib"
|
|
||||||
#addin "Cake.Compression"
|
|
||||||
|
|
||||||
// Build variables
|
|
||||||
var outputFolder = "./_output";
|
|
||||||
var outputFolderMono = outputFolder + "_mono";
|
|
||||||
var outputFolderOsx = outputFolder + "_osx";
|
|
||||||
var outputFolderOsxApp = outputFolderOsx + "_app";
|
|
||||||
var testPackageFolder = "./_tests";
|
|
||||||
var testSearchPattern = "*.Test/bin/x86/Release";
|
|
||||||
var sourceFolder = "./src";
|
|
||||||
var solutionFile = sourceFolder + "/Lidarr.sln";
|
|
||||||
var updateFolder = outputFolder + "/Lidarr.Update";
|
|
||||||
var updateFolderMono = outputFolderMono + "/Lidarr.Update";
|
|
||||||
|
|
||||||
// Artifact variables
|
|
||||||
var artifactsFolder = "./_artifacts";
|
|
||||||
var artifactsFolderWindows = artifactsFolder + "/windows";
|
|
||||||
var artifactsFolderLinux = artifactsFolder + "/linux";
|
|
||||||
var artifactsFolderOsx = artifactsFolder + "/osx";
|
|
||||||
var artifactsFolderOsxApp = artifactsFolder + "/osx-app";
|
|
||||||
|
|
||||||
// Utility methods
|
|
||||||
public void RemoveEmptyFolders(string startLocation) {
|
|
||||||
foreach (var directory in System.IO.Directory.GetDirectories(startLocation))
|
|
||||||
{
|
|
||||||
RemoveEmptyFolders(directory);
|
|
||||||
|
|
||||||
if (System.IO.Directory.GetFiles(directory).Length == 0 &&
|
|
||||||
System.IO.Directory.GetDirectories(directory).Length == 0)
|
|
||||||
{
|
|
||||||
DeleteDirectory(directory, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CleanFolder(string path, bool keepConfigFiles) {
|
|
||||||
DeleteFiles(path + "/**/*.transform");
|
|
||||||
|
|
||||||
if (!keepConfigFiles) {
|
|
||||||
DeleteFiles(path + "/**/*.dll.config");
|
|
||||||
}
|
|
||||||
|
|
||||||
DeleteFiles(path + "/**/FluentValidation.resources.dll");
|
|
||||||
DeleteFiles(path + "/**/App.config");
|
|
||||||
|
|
||||||
DeleteFiles(path + "/**/*.less");
|
|
||||||
|
|
||||||
DeleteFiles(path + "/**/*.vshost.exe");
|
|
||||||
|
|
||||||
DeleteFiles(path + "/**/*.dylib");
|
|
||||||
|
|
||||||
RemoveEmptyFolders(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CreateMdbs(string path) {
|
|
||||||
foreach (var file in System.IO.Directory.EnumerateFiles(path, "*.pdb", System.IO.SearchOption.AllDirectories)) {
|
|
||||||
var actualFile = file.Substring(0, file.Length - 4);
|
|
||||||
|
|
||||||
if (FileExists(actualFile + ".exe")) {
|
|
||||||
StartProcess("./tools/pdb2mdb/pdb2mdb.exe", new ProcessSettings()
|
|
||||||
.WithArguments(args => args.Append(actualFile + ".exe")));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FileExists(actualFile + ".dll")) {
|
|
||||||
StartProcess("./tools/pdb2mdb/pdb2mdb.exe", new ProcessSettings()
|
|
||||||
.WithArguments(args => args.Append(actualFile + ".dll")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build Tasks
|
|
||||||
Task("Compile").Does(() => {
|
|
||||||
// Build
|
|
||||||
if (DirectoryExists(outputFolder)) {
|
|
||||||
DeleteDirectory(outputFolder, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
MSBuild(solutionFile, config =>
|
|
||||||
config.UseToolVersion(MSBuildToolVersion.VS2015)
|
|
||||||
.WithTarget("Clean")
|
|
||||||
.SetVerbosity(Verbosity.Minimal));
|
|
||||||
|
|
||||||
NuGetRestore(solutionFile);
|
|
||||||
|
|
||||||
MSBuild(solutionFile, config =>
|
|
||||||
config.UseToolVersion(MSBuildToolVersion.VS2015)
|
|
||||||
.SetPlatformTarget(PlatformTarget.x86)
|
|
||||||
.SetConfiguration("Release")
|
|
||||||
.WithProperty("AllowedReferenceRelatedFileExtensions", new string[] { ".pdb" })
|
|
||||||
.WithTarget("Build")
|
|
||||||
.SetVerbosity(Verbosity.Minimal));
|
|
||||||
|
|
||||||
CleanFolder(outputFolder, false);
|
|
||||||
|
|
||||||
// Add JsonNet
|
|
||||||
DeleteFiles(outputFolder + "/Newtonsoft.Json.*");
|
|
||||||
CopyFiles(sourceFolder + "/packages/Newtonsoft.Json.*/lib/net35/*.dll", outputFolder);
|
|
||||||
CopyFiles(sourceFolder + "/packages/Newtonsoft.Json.*/lib/net35/*.dll", updateFolder);
|
|
||||||
|
|
||||||
// Remove Mono stuff
|
|
||||||
DeleteFile(outputFolder + "/Mono.Posix.dll");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("Gulp").Does(() => {
|
|
||||||
NpmInstall(new NpmInstallSettings {
|
|
||||||
LogLevel = NpmLogLevel.Silent,
|
|
||||||
WorkingDirectory = "./",
|
|
||||||
Production = true
|
|
||||||
});
|
|
||||||
|
|
||||||
NpmRunScript("build");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("PackageMono").Does(() => {
|
|
||||||
// Start mono package
|
|
||||||
if (DirectoryExists(outputFolderMono)) {
|
|
||||||
DeleteDirectory(outputFolderMono, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
CopyDirectory(outputFolder, outputFolderMono);
|
|
||||||
|
|
||||||
// Create MDBs
|
|
||||||
CreateMdbs(outputFolderMono);
|
|
||||||
|
|
||||||
// Remove PDBs
|
|
||||||
DeleteFiles(outputFolderMono + "/**/*.pdb");
|
|
||||||
|
|
||||||
// Remove service helpers
|
|
||||||
DeleteFiles(outputFolderMono + "/ServiceUninstall.*");
|
|
||||||
DeleteFiles(outputFolderMono + "/ServiceInstall.*");
|
|
||||||
|
|
||||||
// Remove native windows binaries
|
|
||||||
DeleteFiles(outputFolderMono + "/sqlite3.*");
|
|
||||||
DeleteFiles(outputFolderMono + "/MediaInfo.*");
|
|
||||||
|
|
||||||
// Adding Lidarr.Core.dll.config (for dllmap)
|
|
||||||
CopyFile(sourceFolder + "/NzbDrone.Core/Lidarr.Core.dll.config", outputFolderMono + "/Lidarr.Core.dll.config");
|
|
||||||
|
|
||||||
// Adding CurlSharp.dll.config (for dllmap)
|
|
||||||
CopyFile(sourceFolder + "/NzbDrone.Common/CurlSharp.dll.config", outputFolderMono + "/CurlSharp.dll.config");
|
|
||||||
|
|
||||||
// Renaming Lidarr.Console.exe to Lidarr.exe
|
|
||||||
DeleteFiles(outputFolderMono + "/Lidarr.exe*");
|
|
||||||
MoveFile(outputFolderMono + "/Lidarr.Console.exe", outputFolderMono + "/Lidarr.exe");
|
|
||||||
MoveFile(outputFolderMono + "/Lidarr.Console.exe.config", outputFolderMono + "/Lidarr.exe.config");
|
|
||||||
MoveFile(outputFolderMono + "/Lidarr.Console.exe.mdb", outputFolderMono + "/Lidarr.exe.mdb");
|
|
||||||
|
|
||||||
// Remove Lidarr.Windows.*
|
|
||||||
DeleteFiles(outputFolderMono + "/Lidarr.Windows.*");
|
|
||||||
|
|
||||||
// Adding Lidarr.Mono to updatePackage
|
|
||||||
CopyFiles(outputFolderMono + "/Lidarr.Mono.*", updateFolderMono);
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("PackageOsx").Does(() => {
|
|
||||||
// Start osx package
|
|
||||||
if (DirectoryExists(outputFolderOsx)) {
|
|
||||||
DeleteDirectory(outputFolderOsx, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
CopyDirectory(outputFolderMono, outputFolderOsx);
|
|
||||||
|
|
||||||
// Adding sqlite dylibs
|
|
||||||
CopyFiles(sourceFolder + "/Libraries/Sqlite/*.dylib", outputFolderOsx);
|
|
||||||
|
|
||||||
// Adding MediaInfo dylib
|
|
||||||
CopyFiles(sourceFolder + "/Libraries/MediaInfo/*.dylib", outputFolderOsx);
|
|
||||||
|
|
||||||
// Adding Startup script
|
|
||||||
CopyFile("./osx/Lidarr", outputFolderOsx + "/Lidarr");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("PackageOsxApp").Does(() => {
|
|
||||||
// Start osx app package
|
|
||||||
if (DirectoryExists(outputFolderOsxApp)) {
|
|
||||||
DeleteDirectory(outputFolderOsxApp, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateDirectory(outputFolderOsxApp);
|
|
||||||
|
|
||||||
// Copy osx package files
|
|
||||||
CopyDirectory("./osx/Lidarr.app", outputFolderOsxApp + "/Lidarr.app");
|
|
||||||
CopyDirectory(outputFolderOsx, outputFolderOsxApp + "/Lidarr.app/Contents/MacOS");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("PackageTests").Does(() => {
|
|
||||||
// Start tests package
|
|
||||||
if (DirectoryExists(testPackageFolder)) {
|
|
||||||
DeleteDirectory(testPackageFolder, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateDirectory(testPackageFolder);
|
|
||||||
|
|
||||||
// Copy tests
|
|
||||||
CopyFiles(sourceFolder + "/" + testSearchPattern + "/*", testPackageFolder);
|
|
||||||
foreach (var directory in System.IO.Directory.GetDirectories(sourceFolder, "*.Test")) {
|
|
||||||
var releaseDirectory = directory + "/bin/x86/Release";
|
|
||||||
if (DirectoryExists(releaseDirectory)) {
|
|
||||||
foreach (var releaseSubDirectory in System.IO.Directory.GetDirectories(releaseDirectory)) {
|
|
||||||
Information(System.IO.Path.GetDirectoryName(releaseSubDirectory));
|
|
||||||
CopyDirectory(releaseSubDirectory, testPackageFolder + "/" + System.IO.Path.GetFileName(releaseSubDirectory));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Install NUnit.ConsoleRunner
|
|
||||||
NuGetInstall("NUnit.ConsoleRunner", new NuGetInstallSettings {
|
|
||||||
Version = "3.2.0",
|
|
||||||
OutputDirectory = testPackageFolder
|
|
||||||
});
|
|
||||||
|
|
||||||
// Copy dlls
|
|
||||||
CopyFiles(outputFolder + "/*.dll", testPackageFolder);
|
|
||||||
|
|
||||||
// Copy scripts
|
|
||||||
CopyFiles("./*.sh", testPackageFolder);
|
|
||||||
|
|
||||||
// Create MDBs for tests
|
|
||||||
CreateMdbs(testPackageFolder);
|
|
||||||
|
|
||||||
// Remove config
|
|
||||||
DeleteFiles(testPackageFolder + "/*.log.config");
|
|
||||||
|
|
||||||
// Clean
|
|
||||||
CleanFolder(testPackageFolder, true);
|
|
||||||
|
|
||||||
// Adding Lidarr.Core.dll.config (for dllmap)
|
|
||||||
CopyFile(sourceFolder + "/NzbDrone.Core/Lidarr.Core.dll.config", testPackageFolder + "/Lidarr.Core.dll.config");
|
|
||||||
|
|
||||||
// Adding CurlSharp.dll.config (for dllmap)
|
|
||||||
CopyFile(sourceFolder + "/NzbDrone.Common/CurlSharp.dll.config", testPackageFolder + "/CurlSharp.dll.config");
|
|
||||||
|
|
||||||
// Adding CurlSharp libraries
|
|
||||||
CopyFiles(sourceFolder + "/ExternalModules/CurlSharp/libs/i386/*", testPackageFolder);
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("CleanupWindowsPackage").Does(() => {
|
|
||||||
// Remove mono
|
|
||||||
DeleteFiles(outputFolder + "/Lidarr.Mono.*");
|
|
||||||
|
|
||||||
// Adding Lidarr.Windows to updatePackage
|
|
||||||
CopyFiles(outputFolder + "/Lidarr.Windows.*", updateFolder);
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("Build")
|
|
||||||
.IsDependentOn("Compile")
|
|
||||||
.IsDependentOn("Gulp")
|
|
||||||
.IsDependentOn("PackageMono")
|
|
||||||
.IsDependentOn("PackageOsx")
|
|
||||||
.IsDependentOn("PackageOsxApp")
|
|
||||||
.IsDependentOn("PackageTests")
|
|
||||||
.IsDependentOn("CleanupWindowsPackage");
|
|
||||||
|
|
||||||
// Build Artifacts
|
|
||||||
Task("CleanArtifacts").Does(() => {
|
|
||||||
if (DirectoryExists(artifactsFolder)) {
|
|
||||||
DeleteDirectory(artifactsFolder, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateDirectory(artifactsFolder);
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("ArtifactsWindows").Does(() => {
|
|
||||||
CopyDirectory(outputFolder, artifactsFolderWindows + "/Lidarr");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("ArtifactsWindowsInstaller").Does(() => {
|
|
||||||
InnoSetup("./setup/lidarr.iss", new InnoSetupSettings {
|
|
||||||
OutputDirectory = artifactsFolder,
|
|
||||||
ToolPath = "./setup/inno/ISCC.exe"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("ArtifactsLinux").Does(() => {
|
|
||||||
CopyDirectory(outputFolderMono, artifactsFolderLinux + "/Lidarr");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("ArtifactsOsx").Does(() => {
|
|
||||||
CopyDirectory(outputFolderOsx, artifactsFolderOsx + "/Lidarr");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("ArtifactsOsxApp").Does(() => {
|
|
||||||
CopyDirectory(outputFolderOsxApp, artifactsFolderOsxApp);
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("CompressArtifacts").Does(() => {
|
|
||||||
var prefix = "";
|
|
||||||
|
|
||||||
if (AppVeyor.IsRunningOnAppVeyor) {
|
|
||||||
prefix += AppVeyor.Environment.Repository.Branch.Replace("/", "-") + ".";
|
|
||||||
prefix += AppVeyor.Environment.Build.Version + ".";
|
|
||||||
}
|
|
||||||
|
|
||||||
Zip(artifactsFolderWindows, artifactsFolder + "/Lidarr." + prefix + "windows.zip");
|
|
||||||
GZipCompress(artifactsFolderLinux, artifactsFolder + "/Lidarr." + prefix + "linux.tar.gz");
|
|
||||||
GZipCompress(artifactsFolderOsx, artifactsFolder + "/Lidarr." + prefix + "osx.tar.gz");
|
|
||||||
Zip(artifactsFolderOsxApp, artifactsFolder + "/Lidarr." + prefix + "osx-app.zip");
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("Artifacts")
|
|
||||||
.IsDependentOn("CleanArtifacts")
|
|
||||||
.IsDependentOn("ArtifactsWindows")
|
|
||||||
.IsDependentOn("ArtifactsWindowsInstaller")
|
|
||||||
.IsDependentOn("ArtifactsLinux")
|
|
||||||
.IsDependentOn("ArtifactsOsx")
|
|
||||||
.IsDependentOn("ArtifactsOsxApp")
|
|
||||||
.IsDependentOn("CompressArtifacts");
|
|
||||||
|
|
||||||
// Run
|
|
||||||
RunTarget("Build");
|
|
||||||
RunTarget("Artifacts");
|
|
|
@ -1,184 +0,0 @@
|
||||||
##########################################################################
|
|
||||||
# This is the Cake bootstrapper script for PowerShell.
|
|
||||||
# This file was downloaded from https://github.com/cake-build/resources
|
|
||||||
# Feel free to change this file to fit your needs.
|
|
||||||
##########################################################################
|
|
||||||
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
This is a Powershell script to bootstrap a Cake build.
|
|
||||||
.DESCRIPTION
|
|
||||||
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
|
|
||||||
and execute your Cake build script with the parameters you provide.
|
|
||||||
.PARAMETER Script
|
|
||||||
The build script to execute.
|
|
||||||
.PARAMETER Target
|
|
||||||
The build script target to run.
|
|
||||||
.PARAMETER Configuration
|
|
||||||
The build configuration to use.
|
|
||||||
.PARAMETER Verbosity
|
|
||||||
Specifies the amount of information to be displayed.
|
|
||||||
.PARAMETER Experimental
|
|
||||||
Tells Cake to use the latest Roslyn release.
|
|
||||||
.PARAMETER WhatIf
|
|
||||||
Performs a dry run of the build script.
|
|
||||||
No tasks will be executed.
|
|
||||||
.PARAMETER Mono
|
|
||||||
Tells Cake to use the Mono scripting engine.
|
|
||||||
.PARAMETER SkipToolPackageRestore
|
|
||||||
Skips restoring of packages.
|
|
||||||
.PARAMETER ScriptArgs
|
|
||||||
Remaining arguments are added here.
|
|
||||||
.LINK
|
|
||||||
http://cakebuild.net
|
|
||||||
#>
|
|
||||||
|
|
||||||
[CmdletBinding()]
|
|
||||||
Param(
|
|
||||||
[string]$Script = "build-appveyor.cake",
|
|
||||||
[string]$Target = "Default",
|
|
||||||
[ValidateSet("Release", "Debug")]
|
|
||||||
[string]$Configuration = "Release",
|
|
||||||
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
|
|
||||||
[string]$Verbosity = "Verbose",
|
|
||||||
[switch]$Experimental,
|
|
||||||
[Alias("DryRun","Noop")]
|
|
||||||
[switch]$WhatIf,
|
|
||||||
[switch]$Mono,
|
|
||||||
[switch]$SkipToolPackageRestore,
|
|
||||||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
|
||||||
[string[]]$ScriptArgs
|
|
||||||
)
|
|
||||||
|
|
||||||
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
|
|
||||||
function MD5HashFile([string] $filePath)
|
|
||||||
{
|
|
||||||
if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))
|
|
||||||
{
|
|
||||||
return $null
|
|
||||||
}
|
|
||||||
|
|
||||||
[System.IO.Stream] $file = $null;
|
|
||||||
[System.Security.Cryptography.MD5] $md5 = $null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
$md5 = [System.Security.Cryptography.MD5]::Create()
|
|
||||||
$file = [System.IO.File]::OpenRead($filePath)
|
|
||||||
return [System.BitConverter]::ToString($md5.ComputeHash($file))
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if ($file -ne $null)
|
|
||||||
{
|
|
||||||
$file.Dispose()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Preparing to run build script..."
|
|
||||||
|
|
||||||
if(!$PSScriptRoot){
|
|
||||||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
|
||||||
}
|
|
||||||
|
|
||||||
$TOOLS_DIR = Join-Path $PSScriptRoot "tools-cake"
|
|
||||||
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
|
|
||||||
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
|
|
||||||
$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
|
|
||||||
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
|
|
||||||
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
|
|
||||||
|
|
||||||
# Should we use mono?
|
|
||||||
$UseMono = "";
|
|
||||||
if($Mono.IsPresent) {
|
|
||||||
Write-Verbose -Message "Using the Mono based scripting engine."
|
|
||||||
$UseMono = "-mono"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Should we use the new Roslyn?
|
|
||||||
$UseExperimental = "";
|
|
||||||
if($Experimental.IsPresent -and !($Mono.IsPresent)) {
|
|
||||||
Write-Verbose -Message "Using experimental version of Roslyn."
|
|
||||||
$UseExperimental = "-experimental"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Is this a dry run?
|
|
||||||
$UseDryRun = "";
|
|
||||||
if($WhatIf.IsPresent) {
|
|
||||||
$UseDryRun = "-dryrun"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make sure tools folder exists
|
|
||||||
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
|
|
||||||
Write-Verbose -Message "Creating tools directory..."
|
|
||||||
New-Item -Path $TOOLS_DIR -Type directory | out-null
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make sure that packages.config exist.
|
|
||||||
if (!(Test-Path $PACKAGES_CONFIG)) {
|
|
||||||
Write-Verbose -Message "Downloading packages.config..."
|
|
||||||
try { (New-Object System.Net.WebClient).DownloadFile("http://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch {
|
|
||||||
Throw "Could not download packages.config."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Try find NuGet.exe in path if not exists
|
|
||||||
if (!(Test-Path $NUGET_EXE)) {
|
|
||||||
Write-Verbose -Message "Trying to find nuget.exe in PATH..."
|
|
||||||
$existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_) }
|
|
||||||
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
|
|
||||||
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
|
|
||||||
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
|
|
||||||
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Try download NuGet.exe if not exists
|
|
||||||
if (!(Test-Path $NUGET_EXE)) {
|
|
||||||
Write-Verbose -Message "Downloading NuGet.exe..."
|
|
||||||
try {
|
|
||||||
(New-Object System.Net.WebClient).DownloadFile($NUGET_URL, $NUGET_EXE)
|
|
||||||
} catch {
|
|
||||||
Throw "Could not download NuGet.exe."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Save nuget.exe path to environment to be available to child processed
|
|
||||||
$ENV:NUGET_EXE = $NUGET_EXE
|
|
||||||
|
|
||||||
# Restore tools from NuGet?
|
|
||||||
if(-Not $SkipToolPackageRestore.IsPresent) {
|
|
||||||
Push-Location
|
|
||||||
Set-Location $TOOLS_DIR
|
|
||||||
|
|
||||||
# Check for changes in packages.config and remove installed tools if true.
|
|
||||||
[string] $md5Hash = MD5HashFile($PACKAGES_CONFIG)
|
|
||||||
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
|
|
||||||
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
|
|
||||||
Write-Verbose -Message "Missing or changed package.config hash..."
|
|
||||||
Remove-Item * -Recurse -Exclude packages.config,nuget.exe
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Verbose -Message "Restoring tools from NuGet..."
|
|
||||||
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
|
|
||||||
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Throw "An error occured while restoring NuGet tools."
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
|
|
||||||
}
|
|
||||||
Write-Verbose -Message ($NuGetOutput | out-string)
|
|
||||||
Pop-Location
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make sure that Cake has been installed.
|
|
||||||
if (!(Test-Path $CAKE_EXE)) {
|
|
||||||
Throw "Could not find Cake.exe at $CAKE_EXE"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Start Cake
|
|
||||||
Write-Host "Running build script..."
|
|
||||||
Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
|
|
||||||
exit $LASTEXITCODE
|
|
145
build.sh
145
build.sh
|
@ -1,15 +1,22 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
msBuild='/c/Program Files (x86)/MSBuild/14.0/Bin'
|
msBuild='/c/Program Files (x86)/MSBuild/14.0/Bin'
|
||||||
outputFolder='./_output'
|
outputFolder='./_output'
|
||||||
outputFolderMono='./_output_mono'
|
outputFolderLinux='./_output_linux'
|
||||||
outputFolderOsx='./_output_osx'
|
outputFolderMacOS='./_output_macos'
|
||||||
outputFolderOsxApp='./_output_osx_app'
|
outputFolderMacOSApp='./_output_macos_app'
|
||||||
testPackageFolder='./_tests/'
|
testPackageFolder='./_tests/'
|
||||||
testSearchPattern='*.Test/bin/x86/Release'
|
testSearchPattern='*.Test/bin/x86/Release'
|
||||||
sourceFolder='./src'
|
sourceFolder='./src'
|
||||||
slnFile=$sourceFolder/Lidarr.sln
|
slnFile=$sourceFolder/Lidarr.sln
|
||||||
updateFolder=$outputFolder/Lidarr.Update
|
updateFolder=$outputFolder/Lidarr.Update
|
||||||
updateFolderMono=$outputFolderMono/Lidarr.Update
|
updateFolderMono=$outputFolderLinux/Lidarr.Update
|
||||||
|
|
||||||
|
#Artifact variables
|
||||||
|
artifactsFolder="./_artifacts";
|
||||||
|
artifactsFolderWindows=$artifactsFolder/windows
|
||||||
|
artifactsFolderLinux=$artifactsFolder/linux
|
||||||
|
artifactsFolderMacOS=$artifactsFolder/macos
|
||||||
|
artifactsFolderMacOSApp=$artifactsFolder/macos-app
|
||||||
|
|
||||||
nuget='tools/nuget/nuget.exe';
|
nuget='tools/nuget/nuget.exe';
|
||||||
CheckExitCode()
|
CheckExitCode()
|
||||||
|
@ -23,12 +30,21 @@ CheckExitCode()
|
||||||
return $status
|
return $status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ProgressStart()
|
||||||
|
{
|
||||||
|
echo "Start '$1'"
|
||||||
|
}
|
||||||
|
|
||||||
|
ProgressEnd()
|
||||||
|
{
|
||||||
|
echo "Finish '$1'"
|
||||||
|
}
|
||||||
|
|
||||||
CleanFolder()
|
CleanFolder()
|
||||||
{
|
{
|
||||||
local path=$1
|
local path=$1
|
||||||
local keepConfigFiles=$2
|
local keepConfigFiles=$2
|
||||||
|
|
||||||
|
|
||||||
find $path -name "*.transform" -exec rm "{}" \;
|
find $path -name "*.transform" -exec rm "{}" \;
|
||||||
|
|
||||||
if [ $keepConfigFiles != true ] ; then
|
if [ $keepConfigFiles != true ] ; then
|
||||||
|
@ -49,13 +65,11 @@ CleanFolder()
|
||||||
find $path -depth -empty -type d -exec rm -r "{}" \;
|
find $path -depth -empty -type d -exec rm -r "{}" \;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AddJsonNet()
|
AddJsonNet()
|
||||||
{
|
{
|
||||||
rm $outputFolder/Newtonsoft.Json.*
|
rm $outputFolder/Newtonsoft.Json.*
|
||||||
cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net35/*.dll $outputFolder
|
cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net35/*.dll $outputFolder
|
||||||
cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net35/*.dll $outputFolder/NzbDrone.Update
|
cp $sourceFolder/packages/Newtonsoft.Json.*/lib/net35/*.dll $updateFolder
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildWithMSBuild()
|
BuildWithMSBuild()
|
||||||
|
@ -74,16 +88,6 @@ BuildWithXbuild()
|
||||||
CheckExitCode xbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb $slnFile
|
CheckExitCode xbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb $slnFile
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressStart()
|
|
||||||
{
|
|
||||||
echo "##teamcity[progressStart '$1']"
|
|
||||||
}
|
|
||||||
|
|
||||||
ProgressEnd()
|
|
||||||
{
|
|
||||||
echo "##teamcity[progressEnd '$1']"
|
|
||||||
}
|
|
||||||
|
|
||||||
LintUI()
|
LintUI()
|
||||||
{
|
{
|
||||||
ProgressStart 'ESLint'
|
ProgressStart 'ESLint'
|
||||||
|
@ -97,7 +101,7 @@ LintUI()
|
||||||
|
|
||||||
Build()
|
Build()
|
||||||
{
|
{
|
||||||
echo "##teamcity[progressStart 'Build']"
|
ProgressStart 'Build'
|
||||||
|
|
||||||
rm -rf $outputFolder
|
rm -rf $outputFolder
|
||||||
|
|
||||||
|
@ -114,15 +118,15 @@ Build()
|
||||||
echo "Removing Mono.Posix.dll"
|
echo "Removing Mono.Posix.dll"
|
||||||
rm $outputFolder/Mono.Posix.dll
|
rm $outputFolder/Mono.Posix.dll
|
||||||
|
|
||||||
echo "##teamcity[progressFinish 'Build']"
|
ProgressEnd 'Build'
|
||||||
}
|
}
|
||||||
|
|
||||||
RunGulp()
|
RunGulp()
|
||||||
{
|
{
|
||||||
ProgressStart 'npm install'
|
ProgressStart 'yarn install'
|
||||||
yarn install
|
yarn install
|
||||||
#npm-cache install npm || CheckExitCode npm install --no-optional --no-bin-links
|
#npm-cache install npm || CheckExitCode npm install --no-optional --no-bin-links
|
||||||
ProgressEnd 'npm install'
|
ProgressEnd 'yarn install'
|
||||||
|
|
||||||
LintUI
|
LintUI
|
||||||
|
|
||||||
|
@ -150,88 +154,91 @@ CreateMdbs()
|
||||||
|
|
||||||
PackageMono()
|
PackageMono()
|
||||||
{
|
{
|
||||||
echo "##teamcity[progressStart 'Creating Mono Package']"
|
ProgressStart 'Creating Mono Package'
|
||||||
rm -rf $outputFolderMono
|
|
||||||
cp -r $outputFolder $outputFolderMono
|
rm -rf $outputFolderLinux
|
||||||
|
cp -r $outputFolder $outputFolderLinux
|
||||||
|
|
||||||
echo "Creating MDBs"
|
echo "Creating MDBs"
|
||||||
CreateMdbs $outputFolderMono
|
CreateMdbs $outputFolderLinux
|
||||||
|
|
||||||
echo "Removing PDBs"
|
echo "Removing PDBs"
|
||||||
find $outputFolderMono -name "*.pdb" -exec rm "{}" \;
|
find $outputFolderLinux -name "*.pdb" -exec rm "{}" \;
|
||||||
|
|
||||||
echo "Removing Service helpers"
|
echo "Removing Service helpers"
|
||||||
rm -f $outputFolderMono/ServiceUninstall.*
|
rm -f $outputFolderLinux/ServiceUninstall.*
|
||||||
rm -f $outputFolderMono/ServiceInstall.*
|
rm -f $outputFolderLinux/ServiceInstall.*
|
||||||
|
|
||||||
echo "Removing native windows binaries Sqlite, MediaInfo"
|
echo "Removing native windows binaries Sqlite, MediaInfo"
|
||||||
rm -f $outputFolderMono/sqlite3.*
|
rm -f $outputFolderLinux/sqlite3.*
|
||||||
rm -f $outputFolderMono/MediaInfo.*
|
rm -f $outputFolderLinux/MediaInfo.*
|
||||||
|
|
||||||
echo "Adding Lidarr.Core.dll.config (for dllmap)"
|
echo "Adding Lidarr.Core.dll.config (for dllmap)"
|
||||||
cp $sourceFolder/NzbDrone.Core/Lidarr.Core.dll.config $outputFolderMono
|
cp $sourceFolder/NzbDrone.Core/Lidarr.Core.dll.config $outputFolderLinux
|
||||||
|
|
||||||
echo "Adding CurlSharp.dll.config (for dllmap)"
|
echo "Adding CurlSharp.dll.config (for dllmap)"
|
||||||
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderMono
|
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderLinux
|
||||||
|
|
||||||
echo "Renaming Lidarr.Console.exe to Lidarr.exe"
|
echo "Renaming Lidarr.Console.exe to Lidarr.exe"
|
||||||
rm $outputFolderMono/Lidarr.exe*
|
rm $outputFolderLinux/Lidarr.exe*
|
||||||
for file in $outputFolderMono/Lidarr.Console.exe*; do
|
for file in $outputFolderLinux/Lidarr.Console.exe*; do
|
||||||
mv "$file" "${file//.Console/}"
|
mv "$file" "${file//.Console/}"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Removing Lidarr.Windows"
|
echo "Removing Lidarr.Windows"
|
||||||
rm $outputFolderMono/Lidarr.Windows.*
|
rm $outputFolderLinux/Lidarr.Windows.*
|
||||||
|
|
||||||
echo "Adding Lidarr.Mono to UpdatePackage"
|
echo "Adding Lidarr.Mono to UpdatePackage"
|
||||||
cp $outputFolderMono/Lidarr.Mono.* $updateFolderMono
|
cp $outputFolderLinux/Lidarr.Mono.* $updateFolderMono
|
||||||
|
|
||||||
echo "##teamcity[progressFinish 'Creating Mono Package']"
|
ProgressEnd 'Creating Mono Package'
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageOsx()
|
PackageOsx()
|
||||||
{
|
{
|
||||||
echo "##teamcity[progressStart 'Creating OS X Package']"
|
ProgressStart 'Creating MacOS Package'
|
||||||
rm -rf $outputFolderOsx
|
|
||||||
cp -r $outputFolderMono $outputFolderOsx
|
rm -rf $outputFolderMacOS
|
||||||
|
cp -r $outputFolderLinux $outputFolderMacOS
|
||||||
|
|
||||||
echo "Adding sqlite dylibs"
|
echo "Adding sqlite dylibs"
|
||||||
cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderOsx
|
cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderMacOS
|
||||||
|
|
||||||
echo "Adding MediaInfo dylib"
|
echo "Adding MediaInfo dylib"
|
||||||
cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderOsx
|
cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderMacOS
|
||||||
|
|
||||||
echo "Adding Startup script"
|
echo "Adding Startup script"
|
||||||
cp ./osx/Lidarr $outputFolderOsx
|
cp ./osx/Lidarr $outputFolderMacOS
|
||||||
|
|
||||||
echo "##teamcity[progressFinish 'Creating OS X Package']"
|
ProgressEnd 'Creating MacOS Package'
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageOsxApp()
|
PackageOsxApp()
|
||||||
{
|
{
|
||||||
echo "##teamcity[progressStart 'Creating OS X App Package']"
|
ProgressStart 'Creating MacOS App Package'
|
||||||
rm -rf $outputFolderOsxApp
|
|
||||||
mkdir $outputFolderOsxApp
|
|
||||||
|
|
||||||
cp -r ./osx/Lidarr.app $outputFolderOsxApp
|
rm -rf $outputFolderMacOSApp
|
||||||
cp -r $outputFolderOsx $outputFolderOsxApp/Lidarr.app/Contents/MacOS
|
mkdir $outputFolderMacOSApp
|
||||||
|
|
||||||
echo "##teamcity[progressFinish 'Creating OS X App Package']"
|
cp -r ./osx/Lidarr.app $outputFolderMacOSApp
|
||||||
|
cp -r $outputFolderMacOS $outputFolderMacOSApp/Lidarr.app/Contents/MacOS
|
||||||
|
|
||||||
|
ProgressEnd 'Creating MacOS App Package'
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageTests()
|
PackageTests()
|
||||||
{
|
{
|
||||||
echo "Packaging Tests"
|
ProgressStart 'Creating Test Package'
|
||||||
echo "##teamcity[progressStart 'Creating Test Package']"
|
|
||||||
rm -rf $testPackageFolder
|
rm -rf $testPackageFolder
|
||||||
mkdir $testPackageFolder
|
mkdir $testPackageFolder
|
||||||
|
|
||||||
find $sourceFolder -path $testSearchPattern -exec cp -r -u -T "{}" $testPackageFolder \;
|
find $sourceFolder -path $testSearchPattern -exec cp -r -u -T "{}" $testPackageFolder \;
|
||||||
|
|
||||||
if [ $runtime = "dotnet" ] ; then
|
if [ $runtime = "dotnet" ] ; then
|
||||||
$nuget install NUnit.ConsoleRunner -Version 3.2.0 -Output $testPackageFolder
|
$nuget install NUnit.ConsoleRunner -Version 3.7.0 -Output $testPackageFolder
|
||||||
else
|
else
|
||||||
mono $nuget install NUnit.ConsoleRunner -Version 3.2.0 -Output $testPackageFolder
|
mono $nuget install NUnit.ConsoleRunner -Version 3.7.0 -Output $testPackageFolder
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp $outputFolder/*.dll $testPackageFolder
|
cp $outputFolder/*.dll $testPackageFolder
|
||||||
|
@ -253,16 +260,41 @@ PackageTests()
|
||||||
echo "Copying CurlSharp libraries"
|
echo "Copying CurlSharp libraries"
|
||||||
cp $sourceFolder/ExternalModules/CurlSharp/libs/i386/* $testPackageFolder
|
cp $sourceFolder/ExternalModules/CurlSharp/libs/i386/* $testPackageFolder
|
||||||
|
|
||||||
echo "##teamcity[progressFinish 'Creating Test Package']"
|
ProgressEnd 'Creating Test Package'
|
||||||
}
|
}
|
||||||
|
|
||||||
CleanupWindowsPackage()
|
CleanupWindowsPackage()
|
||||||
{
|
{
|
||||||
|
ProgressStart 'Cleaning Windows Package'
|
||||||
|
|
||||||
echo "Removing Lidarr.Mono"
|
echo "Removing Lidarr.Mono"
|
||||||
rm -f $outputFolder/Lidarr.Mono.*
|
rm -f $outputFolder/Lidarr.Mono.*
|
||||||
|
|
||||||
echo "Adding Lidarr.Windows to UpdatePackage"
|
echo "Adding Lidarr.Windows to UpdatePackage"
|
||||||
cp $outputFolder/Lidarr.Windows.* $updateFolder
|
cp $outputFolder/Lidarr.Windows.* $updateFolder
|
||||||
|
|
||||||
|
ProgressEnd 'Cleaning Windows Package'
|
||||||
|
}
|
||||||
|
|
||||||
|
PackageArtifacts()
|
||||||
|
{
|
||||||
|
echo "Creating Artifact Directories"
|
||||||
|
|
||||||
|
rm -rf $artifactsFolder
|
||||||
|
mkdir $artifactsFolder
|
||||||
|
|
||||||
|
mkdir $artifactsFolderWindows
|
||||||
|
mkdir $artifactsFolderMacOS
|
||||||
|
mkdir $artifactsFolderLinux
|
||||||
|
mkdir $artifactsFolderWindows/Lidarr
|
||||||
|
mkdir $artifactsFolderMacOS/Lidarr
|
||||||
|
mkdir $artifactsFolderLinux/Lidarr
|
||||||
|
mkdir $artifactsFolderMacOSApp
|
||||||
|
|
||||||
|
cp -r $outputFolder/* $artifactsFolderWindows/Lidarr
|
||||||
|
cp -r $outputFolderMacOSApp/* $artifactsFolderMacOSApp
|
||||||
|
cp -r $outputFolderMacOS/* $artifactsFolderMacOS/Lidarr
|
||||||
|
cp -r $outputFolderLinux/* $artifactsFolderLinux/Lidarr
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use mono or .net depending on OS
|
# Use mono or .net depending on OS
|
||||||
|
@ -284,3 +316,4 @@ PackageOsx
|
||||||
PackageOsxApp
|
PackageOsxApp
|
||||||
PackageTests
|
PackageTests
|
||||||
CleanupWindowsPackage
|
CleanupWindowsPackage
|
||||||
|
PackageArtifacts
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
.title {
|
.title {
|
||||||
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
||||||
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.monitored {
|
.monitored {
|
||||||
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
||||||
|
|
||||||
width: 42px;
|
width: 42px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trackNumber {
|
.trackNumber {
|
||||||
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
||||||
|
|
||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.audio {
|
.audio {
|
||||||
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
||||||
|
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.language,
|
.language,
|
||||||
.video,
|
.video,
|
||||||
.status {
|
.status {
|
||||||
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
composes: cell from 'Components/Table/Cells/TableRowCell.css';
|
||||||
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.albumCount {
|
.albumCount {
|
||||||
font-size: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
color: #8895aa;
|
color: #8895aa;
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.episodeCountContainer {
|
.episodeCountContainer {
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
|
|
||||||
.optionsModalScroller {
|
.optionsModalScroller {
|
||||||
composes: scroller from 'Components/Scroller/Scroller.css';
|
composes: scroller from 'Components/Scroller/Scroller.css';
|
||||||
|
|
||||||
border: 1px solid $inputBorderColor;
|
border: 1px solid $inputBorderColor;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
.form {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.error {
|
|
||||||
color: $dangerColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
.warning {
|
|
||||||
color: $warningColor;
|
|
||||||
}
|
|
|
@ -111,13 +111,13 @@ class QualityDefinition extends Component {
|
||||||
|
|
||||||
<div className={styles.sizes}>
|
<div className={styles.sizes}>
|
||||||
<div>
|
<div>
|
||||||
<Label title={"Minimum size for a 20 minute EP"} kind={kinds.WARNING}>{minTwenty}</Label>
|
<Label title={'Minimum size for a 20 minute EP'} kind={kinds.WARNING}>{minTwenty}</Label>
|
||||||
<Label title={"Minimum size for a 45 minute LP"} kind={kinds.INFO}>{minFortyFive}</Label>
|
<Label title={'Minimum size for a 45 minute LP'} kind={kinds.INFO}>{minFortyFive}</Label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Label title={"Maximum size for a 20 minute EP"} kind={kinds.WARNING}>{maxTwenty}</Label>
|
<Label title={'Maximum size for a 20 minute EP'} kind={kinds.WARNING}>{maxTwenty}</Label>
|
||||||
<Label title={"Maximum size for a 45 minute LP"} kind={kinds.INFO}>{maxFortyFive}</Label>
|
<Label title={'Maximum size for a 45 minute LP'} kind={kinds.INFO}>{maxFortyFive}</Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* occur.
|
* occur.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@define-mixin truncate {
|
@define-mixin truncate {
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
max-width: 100%; /* 1 */
|
max-width: 100%; /* 1 */
|
||||||
text-overflow: ellipsis !important;
|
text-overflow: ellipsis !important;
|
||||||
|
|
|
@ -6,9 +6,10 @@
|
||||||
#define AppURL "https://lidarr.audio/"
|
#define AppURL "https://lidarr.audio/"
|
||||||
#define ForumsURL "https://forums.lidarr.audio/"
|
#define ForumsURL "https://forums.lidarr.audio/"
|
||||||
#define AppExeName "Lidarr.exe"
|
#define AppExeName "Lidarr.exe"
|
||||||
#define BuildNumber "0.3"
|
#define BuildNumber "0.2"
|
||||||
#define BuildNumber GetEnv('BUILD_NUMBER')
|
#define BuildNumber GetEnv('APPVEYOR_BUILD_NUMBER')
|
||||||
#define BranchName GetEnv('branch')
|
#define BuildVersion GetEnv('APPVEYOR_BUILD_VERSION')
|
||||||
|
#define BranchName GetEnv('APPVEYOR_REPO_BRANCH')
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
; NOTE: The value of AppId uniquely identifies this application.
|
; NOTE: The value of AppId uniquely identifies this application.
|
||||||
|
@ -25,7 +26,7 @@ DefaultDirName={commonappdata}\Lidarr\bin
|
||||||
DisableDirPage=yes
|
DisableDirPage=yes
|
||||||
DefaultGroupName={#AppName}
|
DefaultGroupName={#AppName}
|
||||||
DisableProgramGroupPage=yes
|
DisableProgramGroupPage=yes
|
||||||
OutputBaseFilename=Lidarr.{#BranchName}.{#BuildNumber}.windows
|
OutputBaseFilename=Lidarr.{#BranchName}.{#BuildVersion}.windows
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
AppCopyright=Creative Commons 3.0 License
|
AppCopyright=Creative Commons 3.0 License
|
||||||
AllowUNCPath=False
|
AllowUNCPath=False
|
||||||
|
@ -34,7 +35,7 @@ DisableReadyPage=True
|
||||||
CompressionThreads=2
|
CompressionThreads=2
|
||||||
Compression=lzma2/normal
|
Compression=lzma2/normal
|
||||||
AppContact={#ForumsURL}
|
AppContact={#ForumsURL}
|
||||||
VersionInfoVersion={#BuildNumber}
|
VersionInfoVersion=0.2.0.{#BuildNumber}
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
23
test.sh
23
test.sh
|
@ -13,11 +13,19 @@ fi
|
||||||
rm -f "$TEST_LOG_FILE"
|
rm -f "$TEST_LOG_FILE"
|
||||||
|
|
||||||
# Uncomment to log test output to a file instead of the console
|
# Uncomment to log test output to a file instead of the console
|
||||||
# export LIDARR_TESTS_LOG_OUTPUT="File"
|
export LIDARR_TESTS_LOG_OUTPUT="File"
|
||||||
|
|
||||||
NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.2.0/tools/nunit3-console.exe"
|
if [[ -z "${APPVEYOR}" ]]; then
|
||||||
NUNIT_COMMAND="$NUNIT"
|
NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe"
|
||||||
NUNIT_PARAMS="--teamcity --workers=1"
|
NUNIT_COMMAND="$NUNIT"
|
||||||
|
NUNIT_PARAMS="--workers=1"
|
||||||
|
else
|
||||||
|
NUNIT="nunit3-console"
|
||||||
|
NUNIT_COMMAND="$NUNIT"
|
||||||
|
NUNIT_PARAMS="--result=myresults.xml;format=AppVeyor --workers=1"
|
||||||
|
unset TMP
|
||||||
|
unset TEMP
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$PLATFORM" = "Windows" ]; then
|
if [ "$PLATFORM" = "Windows" ]; then
|
||||||
WHERE="$WHERE && cat != LINUX"
|
WHERE="$WHERE && cat != LINUX"
|
||||||
|
@ -51,7 +59,12 @@ $NUNIT_COMMAND --where "$WHERE" $NUNIT_PARAMS $ASSEMBLIES;
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
|
|
||||||
if [ "$EXIT_CODE" -ge 0 ]; then
|
if [ "$EXIT_CODE" -ge 0 ]; then
|
||||||
echo "Failed tests: $EXIT_CODE"
|
if [[ -z "${APPVEYOR}" ]]; then
|
||||||
|
echo "Failed tests: $EXIT_CODE"
|
||||||
|
else
|
||||||
|
echo "Failed tests: $EXIT_CODE"
|
||||||
|
appveyor AddMessage "Failed tests: $EXIT_CODE"
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
exit $EXIT_CODE
|
exit $EXIT_CODE
|
||||||
|
|
Loading…
Reference in a new issue