2024-10-28 01:44:23 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
JPRM="jprm"
|
|
|
|
|
|
|
|
PLUGIN=Jellyfin.Plugin.SmartPlaylist
|
2024-10-28 02:01:46 +01:00
|
|
|
VERSION=$(sed -n '/^version:/ s/^version: *//p' "${PLUGIN}/build.yaml")
|
2024-10-28 01:44:23 +01:00
|
|
|
ARTIFACT_DIR=artifacts
|
2024-10-30 03:14:13 +01:00
|
|
|
REPO_URL="https://gitea.redxef.at/redxef/jellyfin-smart-playlist/releases/download/v${VERSION}/smart-playlist_${VERSION}.zip"
|
2024-10-28 01:44:23 +01:00
|
|
|
|
2024-10-28 04:07:11 +01:00
|
|
|
build() {
|
|
|
|
mkdir -p "${ARTIFACT_DIR}"
|
|
|
|
find "${PLUGIN}" -name project.assets.json -exec rm -v '{}' ';'
|
2024-10-28 01:44:23 +01:00
|
|
|
|
2024-10-28 04:07:11 +01:00
|
|
|
zipfile=$($JPRM --verbosity=debug plugin build "${PLUGIN}" --output="${ARTIFACT_DIR}" --version="${VERSION}") && {
|
|
|
|
$JPRM --verbosity=debug repo add --plugin-url="${REPO_URL}" . "${zipfile}"
|
|
|
|
}
|
2024-10-28 01:44:23 +01:00
|
|
|
}
|
2024-10-28 04:07:11 +01:00
|
|
|
version() {
|
|
|
|
echo "$VERSION"
|
|
|
|
}
|
|
|
|
"$@"
|
2024-10-28 01:44:23 +01:00
|
|
|
exit $?
|
2024-10-28 04:07:11 +01:00
|
|
|
|