diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml new file mode 100644 index 0000000000..483d367b64 --- /dev/null +++ b/.ci/azure-pipelines.yml @@ -0,0 +1,60 @@ +trigger: + batch: true + branches: + include: + - master + - release-* + tags: + include: + - '*' + +jobs: + - job: main_build + displayName: 'Main Build' + + dependsOn: lint + condition: succeeded() + + pool: + vmImage: 'ubuntu-latest' + + steps: + - task: NodeTool@0 + displayName: 'Install Node.js' + inputs: + versionSpec: '10.x' + + - script: | + yarn install + displayName: 'Install dependencies' + + - script: | + yarn pack --filename jellyfin-web.tgz + displayName: 'Build package' + + - task: PublishPipelineArtifact@1 + displayName: 'Publish package' + condition: succeeded() + inputs: + targetPath: '$(Build.SourcesDirectory)/jellyfin-web.tgz' + artifactName: 'jellyfin-web' + + - job: lint + displayName: 'Lint' + + pool: + vmImage: 'ubuntu-latest' + + steps: + - task: NodeTool@0 + displayName: 'Install Node.js' + inputs: + versionSpec: '10.x' + + - script: | + yarn install + displayName: 'Install dependencies' + + - script: | + yarn run lint + displayName: 'Run ESLint' diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index d1a67db6e8..0000000000 --- a/.drone.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -kind: pipeline -name: eslint - -steps: -- name: run - image: nextcloudci/eslint:eslint-1 - commands: - - ./run-eslint.sh diff --git a/.npmignore b/.npmignore index 968748d69b..f5aa5a5219 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,7 @@ +.editorconfig +.ci .gitattributes .github -.drone.yml .eslintrc.yml run-eslint.sh webpack.config.js diff --git a/package.json b/package.json index 0e1922a7e1..6f8ad1f0b1 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "scripts": { "dev": "webpack --mode development", "build": "webpack --mode production", - "lint": "eslint src", + "lint": "eslint \"src\"", "prepare": "webpack --mode production" } } diff --git a/run-eslint.sh b/run-eslint.sh deleted file mode 100755 index 46b74c1a7e..0000000000 --- a/run-eslint.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -e - -# used this pull request for reference -# https://github.com/nextcloud/spreed/pull/48 -ESLINT=$(which eslint || true) -if [ -z "$ESLINT" ] -then - echo "could not find eslint in $PATH" - exit 1 -fi - -echo checking scripts with $ESLINT -find -name "*.js" -print0 | xargs -0 $ESLINT - -# use this line to test changes locally -#find src -name "*.js" -exec sh -c 'npx eslint $1' -- {} \;