From 989acd1501eb91cb6856a072e38fb394bdf75afd Mon Sep 17 00:00:00 2001 From: redxef Date: Mon, 28 Oct 2024 04:07:11 +0100 Subject: [PATCH] ci: allow output of version in release script. --- release.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/release.sh b/release.sh index ad756cd..f7ebbd6 100755 --- a/release.sh +++ b/release.sh @@ -7,10 +7,17 @@ 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}/jellyfin-smart-playlist_${VERSION}.dll" -mkdir -p "${ARTIFACT_DIR}" -find "${PLUGIN}" -name project.assets.json -exec rm -v '{}' ';' +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}" + 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 $? +