The Free Software Media System - Server Backend & API
Modify build scripts to build Unstable versions
Joshua M. Bonifacea418c2480613
diff --git a/deployment/build.centos.amd64 b/deployment/build.centos.amd64index 939bbc45a4..69f0cadcfe 100755--- a/deployment/build.centos.amd64+++ b/deployment/build.centos.amd64@@ -8,6 +8,22 @@ set -o xtrace# Move to source directorypushd ${SOURCE_DIR}+# Modify changelog to unstable configuration if IS_UNSTABLE+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ pushd fedora++ PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )++ sed -i "s/Version:.*/Version: ${BUILD_ID}/" jellyfin.spec+ sed -i "/%changelog/q" jellyfin.spec++ cat <<EOF >>jellyfin.spec+* $( LANG=C date '+%a %b %d %Y' ) Jellyfin Packaging Team <[email protected]>+- Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}+EOF+ popd+fi+# Build RPMmake -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMSrpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpmdiff --git a/deployment/build.debian.amd64 b/deployment/build.debian.amd64index f44c6a7d1d..012e1cebf6 100755--- a/deployment/build.debian.amd64+++ b/deployment/build.debian.amd64@@ -14,6 +14,21 @@ if [[ ${IS_DOCKER} == YES ]]; thensed -i '/dotnet-sdk-3.1,/d' debian/controlfi+# Modify changelog to unstable configuration if IS_UNSTABLE+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ pushd debian+ PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )++ cat <<EOF >changelog+jellyfin-server (${BUILD_ID}-unstable) unstable; urgency=medium++ * Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}++ -- Jellyfin Packaging Team <[email protected]> $( date --rfc-2822 )+EOF+ popd+fi+# Build DEBdpkg-buildpackage -us -uc --pre-clean --post-cleandiff --git a/deployment/build.debian.arm64 b/deployment/build.debian.arm64index 0127671f3d..12ce3e874d 100755--- a/deployment/build.debian.arm64+++ b/deployment/build.debian.arm64@@ -14,6 +14,21 @@ if [[ ${IS_DOCKER} == YES ]]; thensed -i '/dotnet-sdk-3.1,/d' debian/controlfi+# Modify changelog to unstable configuration if IS_UNSTABLE+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ pushd debian+ PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )++ cat <<EOF >changelog+jellyfin-server (${BUILD_ID}-unstable) unstable; urgency=medium++ * Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}++ -- Jellyfin Packaging Team <[email protected]> $( date --rfc-2822 )+EOF+ popd+fi+# Build DEBexport CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}dpkg-buildpackage -us -uc -a arm64 --pre-clean --post-cleandiff --git a/deployment/build.debian.armhf b/deployment/build.debian.armhfindex 02e3db4fca..3089eab585 100755--- a/deployment/build.debian.armhf+++ b/deployment/build.debian.armhf@@ -14,6 +14,21 @@ if [[ ${IS_DOCKER} == YES ]]; thensed -i '/dotnet-sdk-3.1,/d' debian/controlfi+# Modify changelog to unstable configuration if IS_UNSTABLE+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ pushd debian+ PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )++ cat <<EOF >changelog+jellyfin-server (${BUILD_ID}-unstable) unstable; urgency=medium++ * Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}++ -- Jellyfin Packaging Team <[email protected]> $( date --rfc-2822 )+EOF+ popd+fi+# Build DEBexport CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}dpkg-buildpackage -us -uc -a armhf --pre-clean --post-cleandiff --git a/deployment/build.fedora.amd64 b/deployment/build.fedora.amd64index 8ac99decc1..2c7bff5068 100755--- a/deployment/build.fedora.amd64+++ b/deployment/build.fedora.amd64@@ -8,6 +8,22 @@ set -o xtrace# Move to source directorypushd ${SOURCE_DIR}+# Modify changelog to unstable configuration if IS_UNSTABLE+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ pushd fedora++ PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )++ sed -i "s/Version:.*/Version: ${BUILD_ID}/" jellyfin.spec+ sed -i "/%changelog/q" jellyfin.spec++ cat <<EOF >>jellyfin.spec+* $( LANG=C date '+%a %b %d %Y' ) Jellyfin Packaging Team <[email protected]>+- Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}+EOF+ popd+fi+# Build RPMmake -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMSrpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpmdiff --git a/deployment/build.linux.amd64 b/deployment/build.linux.amd64index 0cbbd05cf9..a7fb0544ad 100755--- a/deployment/build.linux.amd64+++ b/deployment/build.linux.amd64@@ -9,7 +9,11 @@ set -o xtracepushd ${SOURCE_DIR}# Get version-version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ version="${BUILD_ID}"+else+ version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"+fi# Build archivesdotnet publish Jellyfin.Server --configuration Release --self-contained --runtime linux-x64 --output dist/jellyfin-server_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"diff --git a/deployment/build.macos b/deployment/build.macosindex 16be29eeef..d808141acc 100755--- a/deployment/build.macos+++ b/deployment/build.macos@@ -9,7 +9,11 @@ set -o xtracepushd ${SOURCE_DIR}# Get version-version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ version="${BUILD_ID}"+else+ version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"+fi# Build archivesdotnet publish Jellyfin.Server --configuration Release --self-contained --runtime osx-x64 --output dist/jellyfin-server_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"diff --git a/deployment/build.portable b/deployment/build.portableindex 1e8a4ab623..24a8cbf32e 100755--- a/deployment/build.portable+++ b/deployment/build.portable@@ -9,7 +9,11 @@ set -o xtracepushd ${SOURCE_DIR}# Get version-version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ version="${BUILD_ID}"+else+ version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"+fi# Build archivesdotnet publish Jellyfin.Server --configuration Release --output dist/jellyfin-server_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"diff --git a/deployment/build.ubuntu.amd64 b/deployment/build.ubuntu.amd64index 107ddbe02d..0eac9cdd10 100755--- a/deployment/build.ubuntu.amd64+++ b/deployment/build.ubuntu.amd64@@ -14,6 +14,21 @@ if [[ ${IS_DOCKER} == YES ]]; thensed -i '/dotnet-sdk-3.1,/d' debian/controlfi+# Modify changelog to unstable configuration if IS_UNSTABLE+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ pushd debian+ PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )++ cat <<EOF >changelog+jellyfin-server (${BUILD_ID}-unstable) unstable; urgency=medium++ * Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}++ -- Jellyfin Packaging Team <[email protected]> $( date --rfc-2822 )+EOF+ popd+fi+# Build DEBdpkg-buildpackage -us -uc --pre-clean --post-cleandiff --git a/deployment/build.ubuntu.arm64 b/deployment/build.ubuntu.arm64index b13868f44b..5b11fd543b 100755--- a/deployment/build.ubuntu.arm64+++ b/deployment/build.ubuntu.arm64@@ -14,6 +14,21 @@ if [[ ${IS_DOCKER} == YES ]]; thensed -i '/dotnet-sdk-3.1,/d' debian/controlfi+# Modify changelog to unstable configuration if IS_UNSTABLE+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ pushd debian+ PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )++ cat <<EOF >changelog+jellyfin-server (${BUILD_ID}-unstable) unstable; urgency=medium++ * Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}++ -- Jellyfin Packaging Team <[email protected]> $( date --rfc-2822 )+EOF+ popd+fi+# Build DEBexport CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}dpkg-buildpackage -us -uc -a arm64 --pre-clean --post-cleandiff --git a/deployment/build.ubuntu.armhf b/deployment/build.ubuntu.armhfindex 0b4dd308a2..4734cf6588 100755--- a/deployment/build.ubuntu.armhf+++ b/deployment/build.ubuntu.armhf@@ -14,6 +14,21 @@ if [[ ${IS_DOCKER} == YES ]]; thensed -i '/dotnet-sdk-3.1,/d' debian/controlfi+# Modify changelog to unstable configuration if IS_UNSTABLE+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ pushd debian+ PR_ID=$( git log --grep 'Merge pull request' --oneline --single-worktree --first-parent | head -1 | grep --color=none -Eo '#[0-9]+' | tr -d '#' )++ cat <<EOF >changelog+jellyfin-server (${BUILD_ID}-unstable) unstable; urgency=medium++ * Jellyfin Server unstable build ${BUILD_ID} for merged PR #${PR_ID}++ -- Jellyfin Packaging Team <[email protected]> $( date --rfc-2822 )+EOF+ popd+fi+# Build DEBexport CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}dpkg-buildpackage -us -uc -a armhf --pre-clean --post-cleandiff --git a/deployment/build.windows.amd64 b/deployment/build.windows.amd64index 39bd41f990..3fabc2cac6 100755--- a/deployment/build.windows.amd64+++ b/deployment/build.windows.amd64@@ -15,7 +15,11 @@ FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/${FFMPEG_VERSION}.zippushd ${SOURCE_DIR}# Get version-version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"+if [[ ${IS_UNSTABLE} == 'yes' ]]; then+ version="${BUILD_ID}"+else+ version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"+fioutput_dir="dist/jellyfin-server_${version}"