From 0c8ff92b9f772b212ebc61ce8b08edbd96b29913 Mon Sep 17 00:00:00 2001 From: redxef Date: Mon, 28 Oct 2024 01:44:23 +0100 Subject: [PATCH] ci: add build script. --- .gitignore | 3 +++ Jellyfin.Plugin.SmartPlaylist/build.yaml | 16 ++++++++++++++++ release.sh | 16 ++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 Jellyfin.Plugin.SmartPlaylist/build.yaml create mode 100755 release.sh diff --git a/.gitignore b/.gitignore index afec7c2..df9646a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ **/obj/ **/bin/ +artifacts/ +smart-playlist/ +manifest.json diff --git a/Jellyfin.Plugin.SmartPlaylist/build.yaml b/Jellyfin.Plugin.SmartPlaylist/build.yaml new file mode 100644 index 0000000..a6ac3e3 --- /dev/null +++ b/Jellyfin.Plugin.SmartPlaylist/build.yaml @@ -0,0 +1,16 @@ +name: Smart Playlist +guid: dd2326e3-4d3e-4bfc-80e6-28502c1131df +version: 0.1.0.0 +targetAbi: 10.10.0.0 +framework: net8.0 +owner: redxef +overview: Smart playlists with Lisp filter engine. +description: | + Create smart playlists with a Lisp filter engine. + + The same playlist definition can be used for multiple users. +category: "General" +artifacts: + - jellyfin-smart-playlist.dll +changelog: | + - Initial Alpha release. diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..9f188fe --- /dev/null +++ b/release.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +JPRM="jprm" + +PLUGIN=Jellyfin.Plugin.SmartPlaylist +VERSION=$(grep -Po '^ *version: * "*\K[^"$]+' "${PLUGIN}/build.yaml") +ARTIFACT_DIR=artifacts +REPO_URL="https://gitea.redxef.at/redxef/jellyfin-smart-playlist/releases/download/v${VERSION}/jellyfin-smart-playlist_${VERSION}.dll" + +mkdir -p "${ARTIFACT_DIR}" +find "${PLUGIN}" -name project.assets.json -exec rm -v '{}' ';' + +zipfile=$($JPRM --verbosity=debug plugin build "${PLUGIN}" --output="${ARTIFACT_DIR}" --version="${VERSION}") && { + $JPRM --verbosity=debug repo add --plugin-url="${REPO_URL}" . "${zipfile}" +} +exit $?