jellyfin-web/deployment/build.debian

40 lines
967 B
Plaintext
Raw Normal View History

2020-03-23 21:06:35 -07:00
#!/bin/bash
set -o errexit
set -o xtrace
# move to source directory
2020-03-23 21:06:35 -07:00
pushd ${SOURCE_DIR}
2021-03-01 16:28:44 -07:00
cp -a package-lock.json /tmp/package-lock.json
2020-03-23 21:06:35 -07:00
# modify changelog to unstable configuration if IS_UNSTABLE
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
2020-06-15 03:54:00 -07:00
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 '#' )
2020-06-15 03:54:00 -07:00
cat <<EOF >changelog
jellyfin-web (${BUILD_ID}-unstable) unstable; urgency=medium
* Jellyfin Web unstable build ${BUILD_ID} for merged PR #${PR_ID}
-- Jellyfin Packaging Team <packaging@jellyfin.org> $( date --rfc-2822 )
EOF
popd
fi
# build deb
2020-03-23 21:06:35 -07:00
dpkg-buildpackage -us -uc --pre-clean --post-clean
mkdir -p ${ARTIFACT_DIR}
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}
2020-03-23 21:06:35 -07:00
2021-03-01 16:28:44 -07:00
cp -a /tmp/package-lock.json package-lock.json
2020-03-23 21:06:35 -07:00
if [[ ${IS_DOCKER} == YES ]]; then
2020-06-15 03:54:00 -07:00
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
2020-03-23 21:06:35 -07:00
fi
popd