aboutsummaryrefslogtreecommitdiff
path: root/deployment/build.macos.arm64
diff options
context:
space:
mode:
authorgnattu <gnattu@users.noreply.github.com>2022-12-08 00:18:04 +0800
committerGitHub <noreply@github.com>2022-12-07 17:18:04 +0100
commit3cb7fe50127b1a8158186b390836ee25ae5a50fd (patch)
tree8b1c7a445a24cb98293a05414d6b4cff71887880 /deployment/build.macos.arm64
parent584c80e323ac2a1386d86ff9f59e50daf174418e (diff)
feat: macOS arm64 build support (#8515)
Diffstat (limited to 'deployment/build.macos.arm64')
-rwxr-xr-xdeployment/build.macos.arm6431
1 files changed, 31 insertions, 0 deletions
diff --git a/deployment/build.macos.arm64 b/deployment/build.macos.arm64
new file mode 100755
index 000000000..42da07e2f
--- /dev/null
+++ b/deployment/build.macos.arm64
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#= macOS 11.0+ arm64 .tar.gz
+
+set -o errexit
+set -o xtrace
+
+# Move to source directory
+pushd ${SOURCE_DIR}
+
+# Get version
+if [[ ${IS_UNSTABLE} == 'yes' ]]; then
+ version="${BUILD_ID}"
+else
+ version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
+fi
+
+# Build archives
+dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime osx-arm64 --output dist/jellyfin-server_${version}/ -p:DebugSymbols=false -p:DebugType=none -p:UseAppHost=true
+tar -czf jellyfin-server_${version}_macos-arm64.tar.gz -C dist jellyfin-server_${version}
+rm -rf dist/jellyfin-server_${version}
+
+# Move the artifacts out
+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}
+fi
+
+popd