diff --git a/deployment/build.centos b/deployment/build.centos index 7dd0343c1..0bf0323ce 100755 --- a/deployment/build.centos +++ b/deployment/build.centos @@ -8,6 +8,20 @@ pushd ${SOURCE_DIR} cp -a yarn.lock /tmp/yarn.lock +# modify changelog to unstable configuration if IS_UNSTABLE +if [[ ${GIT_BRANCH} == 'refs/heads/package' ]]; then + pushd fedora/ + # get the last PR ID + 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 "/Version:.*/Version: ${BUILD_ID}" + sed -i "/%changelog/q" jellyfin-web.spec + cat <>jellyfin-web.spec +* $( LANG=C date '+%a %b %d %Y' ) Jellyfin Packaging Team +- Jellyfin Web unstable build ${BUILD_ID} for merged PR #${PR_ID} +EOF + popd +fi + # build rpm make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm diff --git a/deployment/build.fedora b/deployment/build.fedora index 249403b9e..9ffb5d534 100755 --- a/deployment/build.fedora +++ b/deployment/build.fedora @@ -8,6 +8,20 @@ pushd ${SOURCE_DIR} cp -a yarn.lock /tmp/yarn.lock +# modify changelog to unstable configuration if IS_UNSTABLE +if [[ ${GIT_BRANCH} == 'refs/heads/package' ]]; then + pushd fedora/ + # get the last PR ID + 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 "/Version:.*/Version: ${BUILD_ID}" + sed -i "/%changelog/q" jellyfin-web.spec + cat <>jellyfin-web.spec +* $( LANG=C date '+%a %b %d %Y' ) Jellyfin Packaging Team +- Jellyfin Web unstable build ${BUILD_ID} for merged PR #${PR_ID} +EOF + popd +fi + # build rpm make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm