From caf5444000838b3c6a1b58c5bcf98424803f338b Mon Sep 17 00:00:00 2001 From: dkanada Date: Mon, 15 Jun 2020 19:54:00 +0900 Subject: [PATCH] standardize indentation --- deployment/Dockerfile.docker | 3 +-- deployment/build.centos | 8 +++++--- deployment/build.debian | 7 ++++--- deployment/build.fedora | 8 +++++--- deployment/build.portable | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/deployment/Dockerfile.docker b/deployment/Dockerfile.docker index 1b3e21579..5d1293818 100644 --- a/deployment/Dockerfile.docker +++ b/deployment/Dockerfile.docker @@ -5,8 +5,7 @@ ARG ARTIFACT_DIR=/jellyfin-web RUN apk add autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool make gcc musl-dev nasm python -WORKDIR ${SOURCE_DIR}/ +WORKDIR ${SOURCE_DIR} COPY . . -RUN ls -al . RUN yarn install && mv dist ${ARTIFACT_DIR} diff --git a/deployment/build.centos b/deployment/build.centos index c01c8a64c..25d1e8c17 100755 --- a/deployment/build.centos +++ b/deployment/build.centos @@ -10,11 +10,13 @@ cp -a yarn.lock /tmp/yarn.lock # modify changelog to unstable configuration if IS_UNSTABLE if [[ ${IS_UNSTABLE} == 'yes' ]]; then - pushd fedora/ - # get the last PR ID + 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-web.spec 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} @@ -30,7 +32,7 @@ rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm mv /root/rpmbuild/RPMS/noarch/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/ if [[ ${IS_DOCKER} == YES ]]; then - chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR} + chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR} fi rm -f fedora/jellyfin*.tar.gz diff --git a/deployment/build.debian b/deployment/build.debian index bc8816851..9fe3fb51e 100755 --- a/deployment/build.debian +++ b/deployment/build.debian @@ -10,9 +10,10 @@ cp -a yarn.lock /tmp/yarn.lock # modify changelog to unstable configuration if IS_UNSTABLE if [[ ${IS_UNSTABLE} == 'yes' ]]; then - pushd debian/ - # get the last PR ID + 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 <changelog jellyfin-web (${BUILD_ID}-unstable) unstable; urgency=medium @@ -32,7 +33,7 @@ mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR} cp -a /tmp/yarn.lock yarn.lock if [[ ${IS_DOCKER} == YES ]]; then - chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR} + chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR} fi popd diff --git a/deployment/build.fedora b/deployment/build.fedora index 5be256549..60d270ed6 100755 --- a/deployment/build.fedora +++ b/deployment/build.fedora @@ -10,11 +10,13 @@ cp -a yarn.lock /tmp/yarn.lock # modify changelog to unstable configuration if IS_UNSTABLE if [[ ${IS_UNSTABLE} == 'yes' ]]; then - pushd fedora/ - # get the last PR ID + 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-web.spec 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} @@ -30,7 +32,7 @@ rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm mv /root/rpmbuild/RPMS/noarch/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR} if [[ ${IS_DOCKER} == YES ]]; then - chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR} + chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR} fi rm -f fedora/jellyfin*.tar.gz diff --git a/deployment/build.portable b/deployment/build.portable index fdcfa37c9..7161ae6c2 100755 --- a/deployment/build.portable +++ b/deployment/build.portable @@ -24,7 +24,7 @@ mkdir -p ${ARTIFACT_DIR} mv jellyfin[-_]*.tar.gz ${ARTIFACT_DIR} if [[ ${IS_DOCKER} == YES ]]; then - chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR} + chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR} fi popd