| 123456789101112131415161718192021222324252627282930313233343536 | #!/bin/bash# Builds the TAR archive inside the Docker containerset -o errexitset -o xtrace# Move to source directorypushd ${SOURCE_DIR}# Clone down and build Web frontendweb_build_dir="$( mktemp -d )"web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/pushd ${web_build_dir}if [[ -n ${web_branch} ]]; then    checkout -b origin/${web_branch}fiyarn installmkdir -p ${web_target}mv dist/* ${web_target}/popdrm -rf ${web_build_dir}# Get versionversion="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"# Build archivesdotnet publish --configuration Release --self-contained --runtime osx-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"tar -cvzf /jellyfin_${version}.portable.tar.gz -C /dist jellyfin_${version}rm -rf /dist/jellyfin_${version}# Move the artifacts outmkdir -p ${ARTIFACT_DIR}/mv /jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}/chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
 |