Skip to content

Commit

Permalink
Remove submodule and add clone and build to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
EraYaN committed Sep 24, 2019
1 parent 1156b8f commit 0ca0d9d
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 17 deletions.
35 changes: 28 additions & 7 deletions .ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,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: CmdLine@2
displayName: Clone the UX repository
Expand All @@ -214,7 +235,7 @@ jobs:
inputs:
sourceFolder: $(Build.SourcesDirectory)/deployment/windows/ # Optional
contents: 'jellyfin*.exe'
targetFolder: $(System.ArtifactsDirectory)/setup
targetFolder: $(System.ArtifactsDirectory)/MediaBrowser.WebDashboard/jellyfin-web
cleanTargetFolder: true # Optional
overWrite: true # Optional
flattenFolders: true # Optional
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN apt-get update \
&& chmod 777 /cache /config /media
COPY --from=ffmpeg / /
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web/src
COPY --from=web-builder /dist /jellyfin/jellyfin-web

EXPOSE 8096
VOLUME /cache /config /media
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.arm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN apt-get update \
&& mkdir -p /cache /config /media \
&& chmod 777 /cache /config /media
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web/src
COPY --from=web-builder /dist /jellyfin/jellyfin-web

EXPOSE 8096
VOLUME /cache /config /media
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN apt-get update \
&& mkdir -p /cache /config /media \
&& chmod 777 /cache /config /media
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web/src
COPY --from=web-builder /dist /jellyfin/jellyfin-web

EXPOSE 8096
VOLUME /cache /config /media
Expand Down
2 changes: 1 addition & 1 deletion Jellyfin.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ private static ServerApplicationPaths CreateApplicationPaths(StartupOptions opti
if (string.IsNullOrEmpty(webDir))
{
// Use default location under ResourcesPath
webDir = Path.Combine(AppContext.BaseDirectory, "jellyfin-web", "src");
webDir = Path.Combine(AppContext.BaseDirectory, "jellyfin-web");
}
}

Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<None Include="jellyfin-web\src\**\*.*">
<None Include="jellyfin-web\**\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion MediaBrowser.WebDashboard/jellyfin-web
Submodule jellyfin-web deleted from 867a5e

0 comments on commit 0ca0d9d

Please sign in to comment.