diff --git a/appveyor.yml b/appveyor.yml
index 82ed2bd83..c35b62bc2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -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: >-
diff --git a/build.cake b/build.cake
index 44c994665..fdfe6c8a8 100644
--- a/build.cake
+++ b/build.cake
@@ -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
//////////////////////////////////////////////////////////////////////
diff --git a/src/Ombi.Store/Ombi.Store.csproj b/src/Ombi.Store/Ombi.Store.csproj
index b1c73f411..497b1ec2d 100644
--- a/src/Ombi.Store/Ombi.Store.csproj
+++ b/src/Ombi.Store/Ombi.Store.csproj
@@ -18,9 +18,6 @@
-
-
-