|
|
|
@ -20,41 +20,33 @@ jobs:
|
|
|
|
|
submodules: true
|
|
|
|
|
persistCredentials: true
|
|
|
|
|
|
|
|
|
|
- task: CmdLine@2
|
|
|
|
|
displayName: "Clone Web Branch"
|
|
|
|
|
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'))
|
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
|
displayName: "Download Web Branch"
|
|
|
|
|
condition: in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'BuildCompletion')
|
|
|
|
|
inputs:
|
|
|
|
|
script: "git clone --single-branch --branch $(Build.SourceBranchName) --depth=1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web"
|
|
|
|
|
path: '$(Agent.TempDirectory)'
|
|
|
|
|
artifact: 'jellyfin-web-production'
|
|
|
|
|
source: 'specific'
|
|
|
|
|
project: 'Jellyfin Web'
|
|
|
|
|
pipeline: 'Build'
|
|
|
|
|
runBranch: variables['Build.SourceBranch']
|
|
|
|
|
|
|
|
|
|
- task: CmdLine@2
|
|
|
|
|
displayName: "Clone Web Target"
|
|
|
|
|
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'))
|
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
|
displayName: "Download Web Target"
|
|
|
|
|
condition: in(variables['Build.Reason'], 'PullRequest')
|
|
|
|
|
inputs:
|
|
|
|
|
script: "git clone --single-branch --branch $(System.PullRequest.TargetBranch) --depth 1 https://github.com/jellyfin/jellyfin-web.git $(Agent.TempDirectory)/jellyfin-web"
|
|
|
|
|
path: '$(Agent.TempDirectory)'
|
|
|
|
|
artifact: 'jellyfin-web-production'
|
|
|
|
|
source: 'specific'
|
|
|
|
|
project: 'Jellyfin Web'
|
|
|
|
|
pipeline: 'Build'
|
|
|
|
|
runBranch: variables['System.PullRequest.TargetBranch']
|
|
|
|
|
|
|
|
|
|
- task: NodeTool@0
|
|
|
|
|
displayName: "Install Node"
|
|
|
|
|
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'))
|
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
|
displayName: "Extract Web Client"
|
|
|
|
|
inputs:
|
|
|
|
|
versionSpec: "12.x"
|
|
|
|
|
|
|
|
|
|
- task: CmdLine@2
|
|
|
|
|
displayName: "Build Web Client"
|
|
|
|
|
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 Web Client"
|
|
|
|
|
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:
|
|
|
|
|
sourceFolder: $(Agent.TempDirectory)/jellyfin-web/dist
|
|
|
|
|
contents: "**"
|
|
|
|
|
targetFolder: $(Build.SourcesDirectory)/MediaBrowser.WebDashboard/jellyfin-web
|
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
overWrite: true
|
|
|
|
|
flattenFolders: false
|
|
|
|
|
archiveFilePatterns: '$(Agent.TempDirectory)/*.zip'
|
|
|
|
|
destinationFolder: '$(Build.SourcesDirectory)/MediaBrowser.WebDashboard'
|
|
|
|
|
|
|
|
|
|
- task: UseDotNet@2
|
|
|
|
|
displayName: "Update DotNet"
|
|
|
|
|