23 lines
651 B
Bash
Executable file
23 lines
651 B
Bash
Executable file
#!/bin/sh
|
|
|
|
JPRM="jprm"
|
|
|
|
PLUGIN=Jellyfin.Plugin.SmartPlaylist
|
|
VERSION=$(sed -n '/^version:/ s/^version: *//p' "${PLUGIN}/build.yaml")
|
|
ARTIFACT_DIR=artifacts
|
|
REPO_URL="https://gitea.redxef.at/redxef/jellyfin-smart-playlist/releases/download/v${VERSION}/smart-playlist_${VERSION}.zip"
|
|
|
|
build() {
|
|
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}"
|
|
}
|
|
}
|
|
version() {
|
|
echo "$VERSION"
|
|
}
|
|
"$@"
|
|
exit $?
|
|
|