aboutsummaryrefslogtreecommitdiff
path: root/portable/build.sh
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2024-02-11 14:21:47 -0500
committerJoshua M. Boniface <joshua@boniface.me>2024-02-11 14:21:47 -0500
commit6144590fffb3d29f322dd06e85ebad6e2d7ab67c (patch)
treef1d0ca68ed9834429167f44a62941713aaab1c81 /portable/build.sh
parentAdd combined docker builds and rework Deb builds (diff)
downloadjellyfin-packaging-6144590fffb3d29f322dd06e85ebad6e2d7ab67c.tar.gz
jellyfin-packaging-6144590fffb3d29f322dd06e85ebad6e2d7ab67c.tar.bz2
jellyfin-packaging-6144590fffb3d29f322dd06e85ebad6e2d7ab67c.zip
Add portable builds
Diffstat (limited to 'portable/build.sh')
-rwxr-xr-xportable/build.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/portable/build.sh b/portable/build.sh
new file mode 100755
index 0000000..f8a3295
--- /dev/null
+++ b/portable/build.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+#= Debian .deb builder
+
+set -o errexit
+set -o xtrace
+
+# Create the intermediate build dir
+BUILD_DIR="/build"
+mkdir -p ${BUILD_DIR}
+
+# Move to source directory
+pushd "${SOURCE_DIR}"
+
+# Build server
+pushd jellyfin-server
+dotnet publish Jellyfin.Server --configuration Release --output ${BUILD_DIR}/ -p:DebugSymbols=false -p:DebugType=none -p:UseAppHost=false
+popd
+
+# Build web
+pushd jellyfin-web
+npm ci --no-audit --unsafe-perm
+npm run build:production
+mv dist ${BUILD_DIR}/jellyfin-web
+popd
+
+mkdir -p "${ARTIFACT_DIR}/"
+
+pushd ${BUILD_DIR}
+for ARCHIVE_TYPE in $( tr ',' '\n' <<<"${ARCHIVE_TYPES}" ); do
+ case ${ARCHIVE_TYPE} in
+ tar)
+ tar -czf "${ARTIFACT_DIR}"/jellyfin_${JVERS}.tar.gz .
+ ;;
+ zip)
+ zip -qr "${ARTIFACT_DIR}"/jellyfin_${JVERS}.zip .
+ ;;
+ esac
+done
+popd
+
+# Clean up any lingering artifacts
+make -f debian/rules clean
+rm -rf ${BUILD_DIR}
+
+popd
bgstack15