mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 04:18:06 +02:00
Merge pull request #979 from Wuerfelbecher/release-disable-debug
Build Package releases without debug turned on
This commit is contained in:
commit
500c0b9cba
6 changed files with 13 additions and 21 deletions
|
@ -4,10 +4,8 @@ FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
|
||||||
WORKDIR /repo
|
WORKDIR /repo
|
||||||
COPY . .
|
COPY . .
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
RUN dotnet publish \
|
RUN bash -c "source deployment/common.build.sh && \
|
||||||
--configuration release \
|
build_jellyfin Jellyfin.Server Release linux-x64 /jellyfin"
|
||||||
--output /jellyfin \
|
|
||||||
Jellyfin.Server
|
|
||||||
|
|
||||||
FROM jellyfin/ffmpeg as ffmpeg
|
FROM jellyfin/ffmpeg as ffmpeg
|
||||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
|
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
|
||||||
|
|
|
@ -17,11 +17,8 @@ RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
|
||||||
# Discard objs - may cause failures if exists
|
# Discard objs - may cause failures if exists
|
||||||
RUN find . -type d -name obj | xargs -r rm -r
|
RUN find . -type d -name obj | xargs -r rm -r
|
||||||
# Build
|
# Build
|
||||||
RUN dotnet publish \
|
RUN bash -c "source deployment/common.build.sh && \
|
||||||
-r linux-arm \
|
build_jellyfin Jellyfin.Server Release linux-arm /jellyfin"
|
||||||
--configuration release \
|
|
||||||
--output /jellyfin \
|
|
||||||
Jellyfin.Server
|
|
||||||
|
|
||||||
|
|
||||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm32v7
|
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm32v7
|
||||||
|
|
|
@ -18,11 +18,8 @@ RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
|
||||||
# Discard objs - may cause failures if exists
|
# Discard objs - may cause failures if exists
|
||||||
RUN find . -type d -name obj | xargs -r rm -r
|
RUN find . -type d -name obj | xargs -r rm -r
|
||||||
# Build
|
# Build
|
||||||
RUN dotnet publish \
|
RUN bash -c "source deployment/common.build.sh && \
|
||||||
-r linux-arm64 \
|
build_jellyfin Jellyfin.Server Release linux-arm64 /jellyfin"
|
||||||
--configuration release \
|
|
||||||
--output /jellyfin \
|
|
||||||
Jellyfin.Server
|
|
||||||
|
|
||||||
|
|
||||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
|
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
|
||||||
|
|
|
@ -15,7 +15,6 @@ DEFAULT_CONFIG="Release"
|
||||||
DEFAULT_OUTPUT_DIR="dist/jellyfin-git"
|
DEFAULT_OUTPUT_DIR="dist/jellyfin-git"
|
||||||
DEFAULT_PKG_DIR="pkg-dist"
|
DEFAULT_PKG_DIR="pkg-dist"
|
||||||
DEFAULT_DOCKERFILE="Dockerfile"
|
DEFAULT_DOCKERFILE="Dockerfile"
|
||||||
DEFAULT_IMAGE_TAG="jellyfin:"`git rev-parse --abbrev-ref HEAD`
|
|
||||||
DEFAULT_ARCHIVE_CMD="tar -xvzf"
|
DEFAULT_ARCHIVE_CMD="tar -xvzf"
|
||||||
|
|
||||||
# Parse the version from the AssemblyVersion
|
# Parse the version from the AssemblyVersion
|
||||||
|
@ -36,9 +35,9 @@ build_jellyfin()
|
||||||
|
|
||||||
echo -e "${CYAN}Building jellyfin in '${ROOT}' for ${DOTNETRUNTIME} with configuration ${CONFIG} and output directory '${OUTPUT_DIR}'.${NC}"
|
echo -e "${CYAN}Building jellyfin in '${ROOT}' for ${DOTNETRUNTIME} with configuration ${CONFIG} and output directory '${OUTPUT_DIR}'.${NC}"
|
||||||
if [[ $DOTNETRUNTIME == 'framework' ]]; then
|
if [[ $DOTNETRUNTIME == 'framework' ]]; then
|
||||||
dotnet publish "${ROOT}" --configuration "${CONFIG}" --output="${OUTPUT_DIR}"
|
dotnet publish "${ROOT}" --configuration "${CONFIG}" --output="${OUTPUT_DIR}" "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
|
||||||
else
|
else
|
||||||
dotnet publish "${ROOT}" --configuration "${CONFIG}" --output="${OUTPUT_DIR}" --self-contained --runtime ${DOTNETRUNTIME}
|
dotnet publish "${ROOT}" --configuration "${CONFIG}" --output="${OUTPUT_DIR}" --self-contained --runtime ${DOTNETRUNTIME} "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
|
||||||
fi
|
fi
|
||||||
EXIT_CODE=$?
|
EXIT_CODE=$?
|
||||||
if [ $EXIT_CODE -eq 0 ]; then
|
if [ $EXIT_CODE -eq 0 ]; then
|
||||||
|
@ -53,7 +52,7 @@ build_jellyfin_docker()
|
||||||
(
|
(
|
||||||
BUILD_CONTEXT=${1-$DEFAULT_BUILD_CONTEXT}
|
BUILD_CONTEXT=${1-$DEFAULT_BUILD_CONTEXT}
|
||||||
DOCKERFILE=${2-$DEFAULT_DOCKERFILE}
|
DOCKERFILE=${2-$DEFAULT_DOCKERFILE}
|
||||||
IMAGE_TAG=${3-$DEFAULT_IMAGE_TAG}
|
IMAGE_TAG=${3-"jellyfin:$(git rev-parse --abbrev-ref HEAD)"}
|
||||||
|
|
||||||
echo -e "${CYAN}Building jellyfin docker image in '${BUILD_CONTEXT}' with Dockerfile '${DOCKERFILE}' and tag '${IMAGE_TAG}'.${NC}"
|
echo -e "${CYAN}Building jellyfin docker image in '${BUILD_CONTEXT}' with Dockerfile '${DOCKERFILE}' and tag '${IMAGE_TAG}'.${NC}"
|
||||||
docker build -t ${IMAGE_TAG} -f ${DOCKERFILE} ${BUILD_CONTEXT}
|
docker build -t ${IMAGE_TAG} -f ${DOCKERFILE} ${BUILD_CONTEXT}
|
||||||
|
|
|
@ -16,7 +16,8 @@ override_dh_auto_test:
|
||||||
override_dh_clistrip:
|
override_dh_clistrip:
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
dotnet publish --configuration $(CONFIG) --output='$(CURDIR)/usr/lib/jellyfin/bin' --self-contained --runtime $(DOTNETRUNTIME) Jellyfin.Server
|
dotnet publish --configuration $(CONFIG) --output='$(CURDIR)/usr/lib/jellyfin/bin' --self-contained --runtime $(DOTNETRUNTIME) \
|
||||||
|
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server
|
||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
dotnet clean -maxcpucount:1 --configuration $(CONFIG) Jellyfin.Server || true
|
dotnet clean -maxcpucount:1 --configuration $(CONFIG) Jellyfin.Server || true
|
||||||
|
|
|
@ -49,7 +49,8 @@ Jellyfin is a free software media system that puts you in control of managing an
|
||||||
%install
|
%install
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||||
dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime %{dotnet_runtime} Jellyfin.Server
|
dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime %{dotnet_runtime} \
|
||||||
|
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server
|
||||||
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
|
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
|
||||||
%{__install} -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
|
%{__install} -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
|
||||||
%{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json
|
%{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json
|
||||||
|
@ -73,7 +74,6 @@ EOF
|
||||||
%{_libdir}/%{name}/jellyfin-web/*
|
%{_libdir}/%{name}/jellyfin-web/*
|
||||||
%attr(755,root,root) %{_bindir}/%{name}
|
%attr(755,root,root) %{_bindir}/%{name}
|
||||||
%{_libdir}/%{name}/*.json
|
%{_libdir}/%{name}/*.json
|
||||||
%{_libdir}/%{name}/*.pdb
|
|
||||||
%{_libdir}/%{name}/*.dll
|
%{_libdir}/%{name}/*.dll
|
||||||
%{_libdir}/%{name}/*.so
|
%{_libdir}/%{name}/*.so
|
||||||
%{_libdir}/%{name}/*.a
|
%{_libdir}/%{name}/*.a
|
||||||
|
|
Loading…
Reference in a new issue