From e9fb46b0cdfe24ca2909c8a7b9d4d383f6196482 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Tue, 24 Sep 2019 16:32:57 +0200 Subject: [PATCH] Fix path typo and add same code to main build. --- .ci/azure-pipelines.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 03bd0f690..97bf4ed02 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -31,18 +31,39 @@ jobs: persistCredentials: true - task: CmdLine@2 - displayName: "Update submodules" + displayName: "Check out web" condition: and(succeeded(), or(contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion')) inputs: - script: 'git submodule foreach --recursive git checkout $(Build.SourceBranch)' - workingDirectory: '$(Build.SourcesDirectory)' + script: 'git clone --single-branch --branch $(Build.SourceBranch) --depth=1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web' - task: CmdLine@2 - displayName: "Update submodules (PR)" + displayName: "Check out web (PR)" condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest')) inputs: - script: 'git submodule foreach --recursive git checkout $(System.PullRequest.TargetBranch)' - workingDirectory: '$(Build.SourcesDirectory)' + script: 'git clone --single-branch --branch $(System.PullRequest.TargetBranch) --depth 1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web' + + - task: NodeTool@0 + displayName: 'Install Node.js' + condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion')) + inputs: + versionSpec: '10.x' + + - task: CmdLine@2 + displayName: "Build Web UI" + condition: and(succeeded(), or(contains(variables['System.PullRequest.TargetBranch'], 'release'), contains(variables['System.PullRequest.TargetBranch'], 'master'), contains(variables['Build.SourceBranch'], 'release'), contains(variables['Build.SourceBranch'], 'master')) ,eq(variables['BuildConfiguration'], 'Release'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI', 'BuildCompletion')) + inputs: + script: yarn install + workingDirectory: $(Agent.TempDirectory)/jellyfin-web + + - task: CopyFiles@2 + displayName: Copy the web UI + inputs: + sourceFolder: $(Agent.TempDirectory)/jellyfin-web/dist # Optional + contents: '**' + targetFolder: $(Build.SourcesDirectory)/MediaBrowser.WebDashboard/jellyfin-web + cleanTargetFolder: true # Optional + overWrite: true # Optional + flattenFolders: false # Optional - task: DotNetCoreCLI@2 displayName: Publish @@ -235,7 +256,7 @@ jobs: inputs: sourceFolder: $(Build.SourcesDirectory)/deployment/windows/ # Optional contents: 'jellyfin*.exe' - targetFolder: $(System.ArtifactsDirectory)/MediaBrowser.WebDashboard/jellyfin-web + targetFolder: $(System.ArtifactsDirectory)/setup cleanTargetFolder: true # Optional overWrite: true # Optional flattenFolders: true # Optional