diff --git a/.travis.yml b/.travis.yml index b57e34feb..287734e22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,14 +6,12 @@ addons: apt: packages: - dos2unix - - nuget - libchromaprint-tools update: true homebrew: packages: - yarn - dos2unix - - nuget update: true solution: src/Lidarr.sln before_install: diff --git a/appveyor-package.sh b/appveyor-package.sh old mode 100644 new mode 100755 index 49bd7f393..18d3ef1ff --- a/appveyor-package.sh +++ b/appveyor-package.sh @@ -19,9 +19,11 @@ PublishArtifacts() 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-installer.exe + + if [ "${CI_WINDOWS}" = "True" ]; then + ./setup/inno/ISCC.exe "./setup/lidarr.iss" + cp ./setup/output/Lidarr.*windows.exe $artifactsFolder/Lidarr.${APPVEYOR_REPO_BRANCH}.${APPVEYOR_BUILD_VERSION}.windows-installer.exe + fi } PublishArtifacts diff --git a/appveyor.yml b/appveyor.yml index e5adc3824..c9052b7cc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,8 @@ version: '0.5.0.{build}' -image: Visual Studio 2017 +image: + - Visual Studio 2017 + - Ubuntu1804 assembly_info: patch: true @@ -11,17 +13,22 @@ assembly_info: environment: DOTNET_CLI_TELEMETRY_OPTOUT: 1 - nodejs_version: "8" + nodejs_version: "10" install: - git submodule update --init --recursive - - ps: Install-Product node $env:nodejs_version + - cmd: powershell Install-Product node $env:nodejs_version + - sh: nvm install $nodejs_version + - sh: sudo apt update + - sh: sudo apt install -y libchromaprint-tools build_script: - - C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./build.sh + - cmd: C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./build.sh + - sh: ./build.sh after_build: - - C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./appveyor-package.sh + - cmd: C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./appveyor-package.sh + - sh: ./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 } @@ -29,10 +36,11 @@ after_build: test_script: - node --version - yarn --version - - C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./test.sh Windows Unit + - cmd: C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./test.sh Windows Unit + - sh: ./test.sh Linux Unit + - sh: find "$APPVEYOR_BUILD_FOLDER" -type f -name 'myresults.xml' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/nunit3/$APPVEYOR_JOB_ID" cache: - - '%USERPROFILE%\.nuget\packages' - node_modules -> package.json pull_requests: diff --git a/build.sh b/build.sh index 545ce5050..3116c5c38 100755 --- a/build.sh +++ b/build.sh @@ -76,7 +76,9 @@ BuildWithMSBuild() echo $msBuild export PATH=$msBuild:$PATH + CheckExitCode MSBuild.exe $slnFile //p:Configuration=Debug //p:Platform=x86 //t:Clean //m CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Clean //m + $nuget locals all -clear $nuget restore $slnFile CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Build //m //p:AllowedReferenceRelatedFileExtensions=.pdb } @@ -86,6 +88,7 @@ BuildWithXbuild() export MONO_IOMAP=case CheckExitCode msbuild /p:Configuration=Debug /t:Clean $slnFile CheckExitCode msbuild /p:Configuration=Release /t:Clean $slnFile + mono $nuget locals all -clear mono $nuget restore $slnFile CheckExitCode msbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb $slnFile } @@ -259,7 +262,7 @@ PackageTests() if [ $runtime = "dotnet" ] ; then $nuget install NUnit.ConsoleRunner -Version 3.7.0 -Output $testPackageFolder else - nuget install NUnit.ConsoleRunner -Version 3.7.0 -Output $testPackageFolder + mono $nuget install NUnit.ConsoleRunner -Version 3.7.0 -Output $testPackageFolder fi cp $outputFolder/*.dll $testPackageFolder diff --git a/frontend/gulp/copy.js b/frontend/gulp/copy.js index 7345c7813..8d58ac4a4 100644 --- a/frontend/gulp/copy.js +++ b/frontend/gulp/copy.js @@ -2,7 +2,6 @@ const path = require('path'); const gulp = require('gulp'); const print = require('gulp-print').default; const cache = require('gulp-cached'); -const flatten = require('gulp-flatten'); const livereload = require('gulp-livereload'); const paths = require('./helpers/paths.js'); @@ -10,16 +9,15 @@ gulp.task('copyJs', () => { return gulp.src( [ path.join(paths.src.root, 'polyfills.js') - ]) + ], { base: paths.src.root }) .pipe(cache('copyJs')) .pipe(print()) - .pipe(flatten()) .pipe(gulp.dest(paths.dest.root)) .pipe(livereload()); }); gulp.task('copyHtml', () => { - return gulp.src(paths.src.html) + return gulp.src(paths.src.html, { base: paths.src.root }) .pipe(cache('copyHtml')) .pipe(print()) .pipe(gulp.dest(paths.dest.root)) @@ -28,22 +26,20 @@ gulp.task('copyHtml', () => { gulp.task('copyFonts', () => { return gulp.src( - path.join(paths.src.fonts, '**', '*.*') + path.join(paths.src.fonts, '**', '*.*'), { base: paths.src.root } ) .pipe(cache('copyFonts')) .pipe(print()) - .pipe(flatten({ subPath: 2 })) .pipe(gulp.dest(paths.dest.root)) .pipe(livereload()); }); gulp.task('copyImages', () => { return gulp.src( - path.join(paths.src.images, '**', '*.*') + path.join(paths.src.images, '**', '*.*'), { base: paths.src.root } ) .pipe(cache('copyImages')) .pipe(print()) - .pipe(flatten({ subPath: 2 })) .pipe(gulp.dest(paths.dest.root)) .pipe(livereload()); }); diff --git a/frontend/gulp/helpers/paths.js b/frontend/gulp/helpers/paths.js index e3263755c..8707faec4 100644 --- a/frontend/gulp/helpers/paths.js +++ b/frontend/gulp/helpers/paths.js @@ -1,15 +1,15 @@ -const root = './frontend/src/'; +const root = './frontend/src'; const paths = { src: { root, - html: `${root}*.html`, - scripts: `${root}**/*.js`, - content: `${root}Content/`, - fonts: `${root}Content/Fonts/`, - images: `${root}Content/Images/`, + html: `${root}/*.html`, + scripts: `${root}/**/*.js`, + content: `${root}/Content/`, + fonts: `${root}/Content/Fonts/`, + images: `${root}/Content/Images/`, exclude: { - libs: `!${root}JsLibraries/**` + libs: `!${root}/JsLibraries/**` } }, dest: { diff --git a/package.json b/package.json index 65657f837..3f4c4c7a6 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,6 @@ "gulp": "4.0.0", "gulp-cached": "1.1.1", "gulp-concat": "2.6.1", - "gulp-flatten": "0.4.0", "gulp-livereload": "4.0.1", "gulp-postcss": "8.0.0", "gulp-print": "5.0.0", diff --git a/test.sh b/test.sh index e4a1307f4..202abef2d 100755 --- a/test.sh +++ b/test.sh @@ -20,20 +20,23 @@ if [[ -z "${APPVEYOR}" ]]; then NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe" NUNIT_COMMAND="$NUNIT" NUNIT_PARAMS="--workers=1" -else +elif [ "$PLATFORM" = "Windows" ]; then NUNIT="nunit3-console" NUNIT_COMMAND="$NUNIT" NUNIT_PARAMS="--result=myresults.xml;format=AppVeyor --workers=1" unset TMP unset TEMP +else + NUNIT="$TEST_DIR/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe" + NUNIT_COMMAND="$NUNIT" + NUNIT_PARAMS="--result=myresults.xml --workers=1" + unset TMP + unset TEMP fi if [ "$PLATFORM" = "Windows" ]; then WHERE="$WHERE && cat != LINUX" -elif [ "$PLATFORM" = "Linux" ]; then - WHERE="$WHERE && cat != WINDOWS" - NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT" -elif [ "$PLATFORM" = "Mac" ]; then +elif [ "$PLATFORM" = "Linux" ] || [ "$PLATFORM" = "Mac" ] ; then WHERE="$WHERE && cat != WINDOWS" NUNIT_COMMAND="mono --debug --runtime=v4.0 $NUNIT" else diff --git a/tools/nuget/nuget.exe b/tools/nuget/nuget.exe index 0cc40884a..e00ef51e1 100644 Binary files a/tools/nuget/nuget.exe and b/tools/nuget/nuget.exe differ diff --git a/yarn.lock b/yarn.lock index 03dbea37e..0bcacaafd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3911,14 +3911,6 @@ gulp-concat@2.6.1: through2 "^2.0.0" vinyl "^2.0.0" -gulp-flatten@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/gulp-flatten/-/gulp-flatten-0.4.0.tgz#d9ac819416c30fd5dfb3dea9da79c83a1bcd61d1" - integrity sha512-eg4spVTAiv1xXmugyaCxWne1oPtNG0UHEtABx5W8ScLiqAYceyYm6GYA36x0Qh8KOIXmAZV97L2aYGnKREG3Sg== - dependencies: - plugin-error "^0.1.2" - through2 "^2.0.0" - gulp-livereload@4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/gulp-livereload/-/gulp-livereload-4.0.1.tgz#cb438e62f24363e26b44ddf36fd37c274b8b15ee"