2
0

docker-build.sh 843 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. # Builds the DEB inside the Docker container
  3. set -o errexit
  4. set -o xtrace
  5. # Move to source directory
  6. pushd ${SOURCE_DIR}
  7. # Remove build-dep for dotnet-sdk-2.2, since it's not a package in this image
  8. sed -i '/dotnet-sdk-2.2,/d' debian/control
  9. # Clone down and build Web frontend
  10. web_build_dir="$( mktemp -d )"
  11. web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
  12. git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
  13. pushd ${web_build_dir}
  14. if [[ -n ${web_branch} ]]; then
  15. git checkout origin/${web_branch}
  16. fi
  17. yarn install
  18. mkdir -p ${web_target}
  19. mv dist/* ${web_target}/
  20. popd
  21. rm -rf ${web_build_dir}
  22. # Build DEB
  23. dpkg-buildpackage -us -uc
  24. # Move the artifacts out
  25. mkdir -p ${ARTIFACT_DIR}/deb
  26. mv /jellyfin[-_]* ${ARTIFACT_DIR}/deb/
  27. chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}