From 9f6bca36586646835655de90505b306cbcaa92aa Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 5 Mar 2019 23:22:07 -0500 Subject: [PATCH 1/4] Put output into bin instead of jellyfin-build --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index 3b4167dae4..c3deaba329 100755 --- a/build +++ b/build @@ -217,7 +217,7 @@ for target_platform in ${platform[@]}; do done if [[ -d pkg-dist/ ]]; then echo -e ">> Collecting build artifacts" - target_dir="../../../jellyfin-build/${target_platform}" + target_dir="../../../bin/${target_platform}" mkdir -p ${target_dir} mv pkg-dist/* ${target_dir}/ fi From a994edda044f71ddee360e1120345d8f0ddea81e Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 5 Mar 2019 23:27:17 -0500 Subject: [PATCH 2/4] Allow complete ignoring of submodule Used by the parent build infrastructure --- build | 58 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/build b/build index c3deaba329..51d4b79a20 100755 --- a/build +++ b/build @@ -26,7 +26,7 @@ usage() { echo -e " $ build [-k/--keep-artifacts] [-b/--web-branch ] " echo -e "" echo -e "The 'keep-artifacts' option preserves build artifacts, e.g. Docker images for system package builds." - echo -e "The web_branch defaults to the same branch name as the current main branch." + echo -e "The web_branch defaults to the same branch name as the current main branch or can be 'local' to not touch the submodule branching." echo -e "To build all platforms, use 'all'." echo -e "To perform all build actions, use 'all'." echo -e "Build output files are collected at '../jellyfin-build/'." @@ -164,37 +164,39 @@ for target_platform in ${platform[@]}; do fi done -# Initialize submodules -git submodule update --init --recursive +if [[ ${web_branch} != 'local' ]]; then + # Initialize submodules + git submodule update --init --recursive -# configure branch -pushd MediaBrowser.WebDashboard/jellyfin-web + # configure branch + pushd MediaBrowser.WebDashboard/jellyfin-web -if ! git diff-index --quiet HEAD --; then - popd - echo - echo "ERROR: Your 'jellyfin-web' submodule working directory is not clean!" - echo "This script will overwrite your unstaged and unpushed changes." - echo "Please do development on 'jellyfin-web' outside of the submodule." - exit 1 -fi - -git fetch --all -# If this is an official branch name, fetch it from origin -official_branches_regex="^master$|^dev$|^release-.*$|^hotfix-.*$" -if [[ ${web_branch} =~ ${official_branches_regex} ]]; then - git checkout origin/${web_branch} || { - echo "ERROR: 'jellyfin-web' branch 'origin/${web_branch}' is invalid." + if ! git diff-index --quiet HEAD --; then + popd + echo + echo "ERROR: Your 'jellyfin-web' submodule working directory is not clean!" + echo "This script will overwrite your unstaged and unpushed changes." + echo "Please do development on 'jellyfin-web' outside of the submodule." exit 1 - } -# Otherwise, just check out the local branch (for testing, etc.) -else - git checkout ${web_branch} || { - echo "ERROR: 'jellyfin-web' branch '${web_branch}' is invalid." - exit 1 - } + fi + + git fetch --all + # If this is an official branch name, fetch it from origin + official_branches_regex="^master$|^dev$|^release-.*$|^hotfix-.*$" + if [[ ${web_branch} =~ ${official_branches_regex} ]]; then + git checkout origin/${web_branch} || { + echo "ERROR: 'jellyfin-web' branch 'origin/${web_branch}' is invalid." + exit 1 + } + # Otherwise, just check out the local branch (for testing, etc.) + else + git checkout ${web_branch} || { + echo "ERROR: 'jellyfin-web' branch '${web_branch}' is invalid." + exit 1 + } + fi + popd fi -popd # Execute each platform and action in order, if said action is enabled pushd deployment/ From bf9f342c1321e1644246ba9a92cb76518e9180e4 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 5 Mar 2019 23:53:07 -0500 Subject: [PATCH 3/4] Add build.yaml for parent build infrastructure --- build.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 build.yaml diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000000..b0d2502d53 --- /dev/null +++ b/build.yaml @@ -0,0 +1,15 @@ +--- +# We just wrap `build` so this is really it +name: "jellyfin" +version: "10.2.2" +packages: + - debian-package-x64 + - debian-package-armhf + - ubuntu-package-x64 + - fedora-package-x64 + - centos-package-x64 + - linux-x64 + - macos + - portable + - win-x64 + - win-x86 From 4ef7eda593ba9061db5b44e1d11939421550783b Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Wed, 6 Mar 2019 09:22:38 -0500 Subject: [PATCH 4/4] Copy install script from new location --- deployment/win-x64/package.sh | 4 ++-- deployment/win-x86/package.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deployment/win-x64/package.sh b/deployment/win-x64/package.sh index d21e3b5325..b438c28e4b 100755 --- a/deployment/win-x64/package.sh +++ b/deployment/win-x64/package.sh @@ -21,8 +21,8 @@ package_win64() ( cp ${TEMP_DIR}/${FFMPEG_VERSION}/bin/ffmpeg.exe ${OUTPUT_DIR}/ffmpeg.exe cp ${TEMP_DIR}/${FFMPEG_VERSION}/bin/ffprobe.exe ${OUTPUT_DIR}/ffprobe.exe rm -r ${TEMP_DIR} - cp ${ROOT}/deployment/win-generic/install-jellyfin.ps1 ${OUTPUT_DIR}/install-jellyfin.ps1 - cp ${ROOT}/deployment/win-generic/install.bat ${OUTPUT_DIR}/install.bat + cp ${ROOT}/deployment/windows/install-jellyfin.ps1 ${OUTPUT_DIR}/install-jellyfin.ps1 + cp ${ROOT}/deployment/windows/install.bat ${OUTPUT_DIR}/install.bat mkdir -p ${PKG_DIR} pushd ${OUTPUT_DIR} ${ARCHIVE_CMD} ${ROOT}/${PKG_DIR}/`basename "${OUTPUT_DIR}"`.zip . diff --git a/deployment/win-x86/package.sh b/deployment/win-x86/package.sh index 3cc4eb6239..8752d92a89 100755 --- a/deployment/win-x86/package.sh +++ b/deployment/win-x86/package.sh @@ -20,8 +20,8 @@ package_win32() ( cp ${TEMP_DIR}/${FFMPEG_VERSION}/bin/ffmpeg.exe ${OUTPUT_DIR}/ffmpeg.exe cp ${TEMP_DIR}/${FFMPEG_VERSION}/bin/ffprobe.exe ${OUTPUT_DIR}/ffprobe.exe rm -r ${TEMP_DIR} - cp ${ROOT}/deployment/win-generic/install-jellyfin.ps1 ${OUTPUT_DIR}/install-jellyfin.ps1 - cp ${ROOT}/deployment/win-generic/install.bat ${OUTPUT_DIR}/install.bat + cp ${ROOT}/deployment/windows/install-jellyfin.ps1 ${OUTPUT_DIR}/install-jellyfin.ps1 + cp ${ROOT}/deployment/windows/install.bat ${OUTPUT_DIR}/install.bat mkdir -p ${PKG_DIR} pushd ${OUTPUT_DIR} ${ARCHIVE_CMD} ${ROOT}/${PKG_DIR}/`basename "${OUTPUT_DIR}"`.zip .