build stuff

pull/3895/head
Jamie Rees 5 years ago
parent 980d452b7e
commit b1cf9536df

@ -1,13 +1,17 @@
version: 4.0.{build}
configuration: Release
os: Visual Studio 2017
os: Visual Studio 2019
environment:
nodejs_version: "9.8.0"
typescript_version: "3.0.1"
github_auth_token:
secure: H/7uCrjmWHGJxgN3l9fbhhdVjvvWI8VVF4ZzQqeXuJwAf+PgSNBdxv4SS+rMQ+RH
sonarrcloudtoken:
secure: WGkIog4wuMSx1q5vmSOgIBXMtI/leMpLbZhi9MJnJdBBuDfcv12zwXg3LQwY0WbE
# Do not build on tags (GitHub and BitBucket)
skip_tags: true
install:
# Get the latest stable version of Node.js or io.js
@ -16,18 +20,25 @@ install:
- cmd: set path=%programfiles(x86)%\\Microsoft SDKs\TypeScript\3.0;%path%
- cmd: tsc -v
build_script:
# - dotnet tool install --global dotnet-sonarscanner
#- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { dotnet sonarscanner begin /k:"tidusjar_Ombi" /d:sonar.organization="tidusjar-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$env.sonarrcloud_token" /d:sonar.analysis.mode="preview" /d:sonar.github.pullRequest="$env:APPVEYOR_PULL_REQUEST_NUMBER" /d:sonar.github.repository="https://github.com/tidusjar/ombi" /d:sonar.github.oauth="$env.github_auth_token" }
# - ps: if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { dotnet sonarscanner begin /k:"tidusjar_Ombi" /d:sonar.organization="tidusjar-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$env.SONARRCLOUDTOKEN" }
- ps: ./build.ps1 --settings_skipverification=true
# - dotnet sonarscanner end /d:sonar.login="%sonarrcloudtoken%"
#test:
# only assemblies to test
#assemblies:
#only:
# - '**\*.Tests.dll'
- ps: |
$deployBranches = @{
# 'feature/v4',
'develop',
'master'
}
if(env:APPVEYOR_REPO_BRANCH -in $deployBranches) {
Write-Output "This is a deployment build"
./build.ps1 --settings_skipverification=true --target=build
}
else
{
Write-Output "This is a not a deployment build"
./build.ps1 --settings_skipverification=true --target=build
}
skip_commits:
files:
- '**/*.md'
after_build:
- cmd: >-

@ -135,7 +135,7 @@ Task("Gulp Publish")
Task("TSLint")
.Does(() =>
{
// Yarn.FromPath(uiProjectDir).RunScript("lint");
Yarn.FromPath(uiProjectDir).RunScript("lint");
});
Task("PrePublish")
@ -263,6 +263,21 @@ Task("Run-Unit-Tests")
DotNetCoreTest(file.FullPath, settings);
}
});
Task("Run-Server-Build")
.Does(() =>
{
var settings = new DotNetCoreBuildSettings
{
Framework = frameworkVer,
Configuration = "Release",
OutputDirectory = Directory(buildDir)
};
DotNetCoreBuild(csProj, settings);
});
Task("Run-UI-Build")
.IsDependentOn("PrePublish");
//////////////////////////////////////////////////////////////////////
// TASK TARGETS
//////////////////////////////////////////////////////////////////////
@ -270,6 +285,12 @@ Task("Run-Unit-Tests")
Task("Default")
.IsDependentOn("Publish");
Task("Build")
.IsDependentOn("SetVersionInfo")
.IsDependentOn("Run-Unit-Tests")
.IsDependentOn("Run-Server-Build")
.IsDependentOn("Run-UI-Build");
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////

@ -18,9 +18,6 @@
<PackageReference Include="Nito.AsyncEx" Version="5.0.0-pre-05" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="1.1.9" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Ombi.Helpers\Ombi.Helpers.csproj" />
</ItemGroup>

Loading…
Cancel
Save