add packaging step on azure and refactor pipelines
This commit is contained in:
parent
a27eae98e5
commit
f9797c0658
13 changed files with 170 additions and 137 deletions
57
.ci/azure-pipelines-build.yml
Normal file
57
.ci/azure-pipelines-build.yml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
jobs:
|
||||||
|
- job: Build
|
||||||
|
displayName: 'Build'
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
Development:
|
||||||
|
BuildConfiguration: development
|
||||||
|
Production:
|
||||||
|
BuildConfiguration: production
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
displayName: 'Install Node'
|
||||||
|
inputs:
|
||||||
|
versionSpec: '12.x'
|
||||||
|
|
||||||
|
- task: Cache@2
|
||||||
|
displayName: 'Check Cache'
|
||||||
|
inputs:
|
||||||
|
key: 'yarn | yarn.lock'
|
||||||
|
path: 'node_modules'
|
||||||
|
cacheHitVar: CACHE_RESTORED
|
||||||
|
|
||||||
|
- script: 'yarn install --frozen-lockfile'
|
||||||
|
displayName: 'Install Dependencies'
|
||||||
|
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||||
|
|
||||||
|
- script: 'yarn build:development'
|
||||||
|
displayName: 'Build Development'
|
||||||
|
condition: eq(variables['BuildConfiguration'], 'development')
|
||||||
|
|
||||||
|
- script: 'yarn build:production'
|
||||||
|
displayName: 'Build Production'
|
||||||
|
condition: eq(variables['BuildConfiguration'], 'production')
|
||||||
|
|
||||||
|
- script: 'test -d dist'
|
||||||
|
displayName: 'Check Build'
|
||||||
|
|
||||||
|
- script: 'mv dist jellyfin-web'
|
||||||
|
displayName: 'Rename Directory'
|
||||||
|
|
||||||
|
- task: ArchiveFiles@2
|
||||||
|
displayName: 'Archive Directory'
|
||||||
|
inputs:
|
||||||
|
rootFolderOrFile: 'jellyfin-web'
|
||||||
|
includeRootFolder: true
|
||||||
|
archiveFile: 'jellyfin-web-$(BuildConfiguration)'
|
||||||
|
|
||||||
|
- task: PublishPipelineArtifact@1
|
||||||
|
displayName: 'Publish Release'
|
||||||
|
inputs:
|
||||||
|
targetPath: '$(Build.SourcesDirectory)/jellyfin-web-$(BuildConfiguration).zip'
|
||||||
|
artifactName: 'jellyfin-web-$(BuildConfiguration)'
|
29
.ci/azure-pipelines-lint.yml
Normal file
29
.ci/azure-pipelines-lint.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
jobs:
|
||||||
|
- job: Lint
|
||||||
|
displayName: 'Lint'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
displayName: 'Install Node'
|
||||||
|
inputs:
|
||||||
|
versionSpec: '12.x'
|
||||||
|
|
||||||
|
- task: Cache@2
|
||||||
|
displayName: 'Check Cache'
|
||||||
|
inputs:
|
||||||
|
key: 'yarn | yarn.lock'
|
||||||
|
path: 'node_modules'
|
||||||
|
cacheHitVar: CACHE_RESTORED
|
||||||
|
|
||||||
|
- script: 'yarn install --frozen-lockfile'
|
||||||
|
displayName: 'Install Dependencies'
|
||||||
|
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||||
|
|
||||||
|
- script: 'yarn run lint --quiet'
|
||||||
|
displayName: 'Run ESLint'
|
||||||
|
|
||||||
|
- script: 'yarn run stylelint'
|
||||||
|
displayName: 'Run Stylelint'
|
30
.ci/azure-pipelines-package.yml
Normal file
30
.ci/azure-pipelines-package.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
jobs:
|
||||||
|
- job: Package
|
||||||
|
displayName: 'Package'
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
CentOS:
|
||||||
|
BuildConfiguration: centos
|
||||||
|
Debian:
|
||||||
|
BuildConfiguration: debian
|
||||||
|
Fedora:
|
||||||
|
BuildConfiguration: fedora
|
||||||
|
Portable:
|
||||||
|
BuildConfiguration: portable
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- script: 'docker build -f deployment/Dockerfile.$(BuildConfiguration) -t jellyfin-web-$(BuildConfiguration) deployment'
|
||||||
|
displayName: 'Build Dockerfile'
|
||||||
|
|
||||||
|
- script: 'docker image ls -a && docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin jellyfin-web-$(BuildConfiguration)'
|
||||||
|
displayName: 'Run Dockerfile'
|
||||||
|
|
||||||
|
- task: PublishPipelineArtifact@1
|
||||||
|
displayName: 'Publish Release'
|
||||||
|
inputs:
|
||||||
|
targetPath: '$(Build.SourcesDirectory)/deployment/dist'
|
||||||
|
artifactName: 'jellyfin-web-$(BuildConfiguration)'
|
|
@ -12,88 +12,6 @@ pr:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Build
|
- template: azure-pipelines-build.yml
|
||||||
displayName: 'Build'
|
- template: azure-pipelines-lint.yml
|
||||||
|
- template: azure-pipelines-package.yml
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
Development:
|
|
||||||
BuildConfiguration: development
|
|
||||||
Production:
|
|
||||||
BuildConfiguration: production
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
displayName: 'Install Node'
|
|
||||||
inputs:
|
|
||||||
versionSpec: '12.x'
|
|
||||||
|
|
||||||
- task: Cache@2
|
|
||||||
displayName: 'Check Cache'
|
|
||||||
inputs:
|
|
||||||
key: 'yarn | yarn.lock'
|
|
||||||
path: 'node_modules'
|
|
||||||
cacheHitVar: CACHE_RESTORED
|
|
||||||
|
|
||||||
- script: 'yarn install --frozen-lockfile'
|
|
||||||
displayName: 'Install Dependencies'
|
|
||||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
|
||||||
|
|
||||||
- script: 'yarn build:development'
|
|
||||||
displayName: 'Build Development'
|
|
||||||
condition: eq(variables['BuildConfiguration'], 'development')
|
|
||||||
|
|
||||||
- script: 'yarn build:production'
|
|
||||||
displayName: 'Build Production'
|
|
||||||
condition: eq(variables['BuildConfiguration'], 'production')
|
|
||||||
|
|
||||||
- script: 'test -d dist'
|
|
||||||
displayName: 'Check Build'
|
|
||||||
|
|
||||||
- script: 'mv dist jellyfin-web'
|
|
||||||
displayName: 'Rename Directory'
|
|
||||||
|
|
||||||
- task: ArchiveFiles@2
|
|
||||||
displayName: 'Archive Directory'
|
|
||||||
inputs:
|
|
||||||
rootFolderOrFile: 'jellyfin-web'
|
|
||||||
includeRootFolder: true
|
|
||||||
archiveFile: 'jellyfin-web-$(BuildConfiguration)'
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Release'
|
|
||||||
inputs:
|
|
||||||
targetPath: '$(Build.SourcesDirectory)/jellyfin-web-$(BuildConfiguration).zip'
|
|
||||||
artifactName: 'jellyfin-web-$(BuildConfiguration)'
|
|
||||||
|
|
||||||
- job: Lint
|
|
||||||
displayName: 'Lint'
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
displayName: 'Install Node'
|
|
||||||
inputs:
|
|
||||||
versionSpec: '12.x'
|
|
||||||
|
|
||||||
- task: Cache@2
|
|
||||||
displayName: 'Check Cache'
|
|
||||||
inputs:
|
|
||||||
key: 'yarn | yarn.lock'
|
|
||||||
path: 'node_modules'
|
|
||||||
cacheHitVar: CACHE_RESTORED
|
|
||||||
|
|
||||||
- script: 'yarn install --frozen-lockfile'
|
|
||||||
displayName: 'Install Dependencies'
|
|
||||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
|
||||||
|
|
||||||
- script: 'yarn run lint --quiet'
|
|
||||||
displayName: 'Run ESLint'
|
|
||||||
|
|
||||||
- script: 'yarn run stylelint'
|
|
||||||
displayName: 'Run Stylelint'
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
FROM centos:7
|
FROM centos:7
|
||||||
|
|
||||||
# Docker build arguments
|
# Docker build arguments
|
||||||
ARG SOURCE_DIR=/jellyfin
|
ARG SOURCE_DIR=/jellyfin
|
||||||
ARG ARTIFACT_DIR=/dist
|
ARG ARTIFACT_DIR=/dist
|
||||||
|
|
||||||
# Docker run environment
|
# Docker run environment
|
||||||
ENV SOURCE_DIR=/jellyfin
|
ENV SOURCE_DIR=/jellyfin
|
||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
|
@ -9,19 +11,19 @@ ENV IS_DOCKER=YES
|
||||||
|
|
||||||
# Prepare CentOS environment
|
# Prepare CentOS environment
|
||||||
RUN yum update -y \
|
RUN yum update -y \
|
||||||
&& yum install -y epel-release \
|
&& yum install -y epel-release \
|
||||||
&& yum install -y @buildsys-build rpmdevtools git yum-plugins-core nodejs-yarn autoconf automake glibc-devel
|
&& yum install -y @buildsys-build rpmdevtools git yum-plugins-core nodejs-yarn autoconf automake glibc-devel
|
||||||
|
|
||||||
# Install recent NodeJS and Yarn
|
# Install recent NodeJS and Yarn
|
||||||
RUN curl -fSsLo /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
RUN curl -fSsLo /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
||||||
&& rpm -i https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm \
|
&& rpm -i https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm \
|
||||||
&& yum install -y yarn
|
&& yum install -y yarn
|
||||||
|
|
||||||
# Link to build script
|
# Link to build script
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.centos.all /build.sh
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.centos /build.sh
|
||||||
|
|
||||||
VOLUME ${SOURCE_DIR}/
|
VOLUME ${SOURCE_DIR}
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}/
|
VOLUME ${ARTIFACT_DIR}
|
||||||
|
|
||||||
ENTRYPOINT ["/build.sh"]
|
ENTRYPOINT ["/build.sh"]
|
|
@ -1,7 +1,9 @@
|
||||||
FROM debian:10
|
FROM debian:10
|
||||||
|
|
||||||
# Docker build arguments
|
# Docker build arguments
|
||||||
ARG SOURCE_DIR=/jellyfin
|
ARG SOURCE_DIR=/jellyfin
|
||||||
ARG ARTIFACT_DIR=/dist
|
ARG ARTIFACT_DIR=/dist
|
||||||
|
|
||||||
# Docker run environment
|
# Docker run environment
|
||||||
ENV SOURCE_DIR=/jellyfin
|
ENV SOURCE_DIR=/jellyfin
|
||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
|
@ -10,16 +12,16 @@ ENV IS_DOCKER=YES
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y debhelper mmv npm git
|
&& apt-get install -y debhelper mmv npm git
|
||||||
|
|
||||||
# Prepare Yarn
|
# Prepare Yarn
|
||||||
RUN npm install -g yarn
|
RUN npm install -g yarn
|
||||||
|
|
||||||
# Link to build script
|
# Link to build script
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian.all /build.sh
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian /build.sh
|
||||||
|
|
||||||
VOLUME ${SOURCE_DIR}/
|
VOLUME ${SOURCE_DIR}
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}/
|
VOLUME ${ARTIFACT_DIR}
|
||||||
|
|
||||||
ENTRYPOINT ["/build.sh"]
|
ENTRYPOINT ["/build.sh"]
|
|
@ -1,7 +1,9 @@
|
||||||
FROM fedora:31
|
FROM fedora:31
|
||||||
|
|
||||||
# Docker build arguments
|
# Docker build arguments
|
||||||
ARG SOURCE_DIR=/jellyfin
|
ARG SOURCE_DIR=/jellyfin
|
||||||
ARG ARTIFACT_DIR=/dist
|
ARG ARTIFACT_DIR=/dist
|
||||||
|
|
||||||
# Docker run environment
|
# Docker run environment
|
||||||
ENV SOURCE_DIR=/jellyfin
|
ENV SOURCE_DIR=/jellyfin
|
||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
|
@ -9,13 +11,13 @@ ENV IS_DOCKER=YES
|
||||||
|
|
||||||
# Prepare Fedora environment
|
# Prepare Fedora environment
|
||||||
RUN dnf update -y \
|
RUN dnf update -y \
|
||||||
&& dnf install -y @buildsys-build rpmdevtools git dnf-plugins-core nodejs-yarn autoconf automake glibc-devel
|
&& dnf install -y @buildsys-build rpmdevtools git dnf-plugins-core nodejs-yarn autoconf automake glibc-devel
|
||||||
|
|
||||||
# Link to build script
|
# Link to build script
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.fedora.all /build.sh
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.fedora /build.sh
|
||||||
|
|
||||||
VOLUME ${SOURCE_DIR}/
|
VOLUME ${SOURCE_DIR}
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}/
|
VOLUME ${ARTIFACT_DIR}
|
||||||
|
|
||||||
ENTRYPOINT ["/build.sh"]
|
ENTRYPOINT ["/build.sh"]
|
|
@ -1,16 +1,17 @@
|
||||||
FROM debian:10
|
FROM debian:10
|
||||||
|
|
||||||
# Docker build arguments
|
# Docker build arguments
|
||||||
ARG SOURCE_DIR=/jellyfin
|
ARG SOURCE_DIR=/jellyfin
|
||||||
ARG ARTIFACT_DIR=/dist
|
ARG ARTIFACT_DIR=/dist
|
||||||
|
|
||||||
# Docker run environment
|
# Docker run environment
|
||||||
ENV SOURCE_DIR=/jellyfin
|
ENV SOURCE_DIR=/jellyfin
|
||||||
ENV ARTIFACT_DIR=/dist
|
ENV ARTIFACT_DIR=/dist
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
|
||||||
ENV IS_DOCKER=YES
|
ENV IS_DOCKER=YES
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y mmv npm git
|
&& apt-get install -y mmv npm git
|
||||||
|
|
||||||
# Prepare Yarn
|
# Prepare Yarn
|
||||||
RUN npm install -g yarn
|
RUN npm install -g yarn
|
||||||
|
@ -18,8 +19,8 @@ RUN npm install -g yarn
|
||||||
# Link to build script
|
# Link to build script
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.portable /build.sh
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.portable /build.sh
|
||||||
|
|
||||||
VOLUME ${SOURCE_DIR}/
|
VOLUME ${SOURCE_DIR}
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}/
|
VOLUME ${ARTIFACT_DIR}
|
||||||
|
|
||||||
ENTRYPOINT ["/build.sh"]
|
ENTRYPOINT ["/build.sh"]
|
||||||
|
|
|
@ -1,24 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#= CentOS 7 all .rpm
|
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
# Move to source directory
|
# move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
cp -a yarn.lock /tmp/yarn.lock
|
cp -a yarn.lock /tmp/yarn.lock
|
||||||
|
|
||||||
# Build RPM
|
# build rpm
|
||||||
make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
||||||
rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
||||||
|
|
||||||
# Move the artifacts out
|
# move the artifacts
|
||||||
mv /root/rpmbuild/RPMS/noarch/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/
|
mv /root/rpmbuild/RPMS/noarch/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
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
|
fi
|
||||||
|
|
||||||
rm -f fedora/jellyfin*.tar.gz
|
rm -f fedora/jellyfin*.tar.gz
|
|
@ -1,25 +1,23 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#= Debian/Ubuntu all .deb
|
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
# Move to source directory
|
# move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
cp -a yarn.lock /tmp/yarn.lock
|
cp -a yarn.lock /tmp/yarn.lock
|
||||||
|
|
||||||
# Build DEB
|
# build deb
|
||||||
dpkg-buildpackage -us -uc --pre-clean --post-clean
|
dpkg-buildpackage -us -uc --pre-clean --post-clean
|
||||||
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/
|
mkdir -p ${ARTIFACT_DIR}
|
||||||
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}/
|
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}
|
||||||
|
|
||||||
cp -a /tmp/yarn.lock yarn.lock
|
cp -a /tmp/yarn.lock yarn.lock
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
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
|
fi
|
||||||
|
|
||||||
popd
|
popd
|
|
@ -1,24 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#= Fedora 29+ all .rpm
|
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
# Move to source directory
|
# move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
cp -a yarn.lock /tmp/yarn.lock
|
cp -a yarn.lock /tmp/yarn.lock
|
||||||
|
|
||||||
# Build RPM
|
# build rpm
|
||||||
make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
||||||
rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
||||||
|
|
||||||
# Move the artifacts out
|
# move the artifacts
|
||||||
mv /root/rpmbuild/RPMS/noarch/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/
|
mv /root/rpmbuild/RPMS/noarch/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
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
|
fi
|
||||||
|
|
||||||
rm -f fedora/jellyfin*.tar.gz
|
rm -f fedora/jellyfin*.tar.gz
|
|
@ -1,28 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#= Portable .NET DLL .tar.gz
|
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
# Move to source directory
|
# move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
# Get version
|
# get version
|
||||||
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
||||||
|
|
||||||
# Build archives
|
# build archives
|
||||||
npx yarn install
|
npx yarn install
|
||||||
mv dist/ jellyfin-web_${version}
|
mv dist jellyfin-web-${version}
|
||||||
tar -czf jellyfin-web_${version}_portable.tar.gz jellyfin-web_${version}
|
tar -czf jellyfin-web-${version}-portable.tar.gz jellyfin-web-${version}
|
||||||
rm -rf dist/
|
rm -rf dist
|
||||||
|
|
||||||
# Move the artifacts out
|
# move the artifacts
|
||||||
mkdir -p ${ARTIFACT_DIR}/
|
mkdir -p ${ARTIFACT_DIR}
|
||||||
mv jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}/
|
mv jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
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
|
fi
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -12,7 +12,7 @@ Source0: jellyfin-web-%{version}.tar.gz
|
||||||
%if 0%{?centos}
|
%if 0%{?centos}
|
||||||
BuildRequires: yarn
|
BuildRequires: yarn
|
||||||
%else
|
%else
|
||||||
BuildRequires nodejs-yarn
|
BuildRequires: nodejs-yarn
|
||||||
%endif
|
%endif
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue