#!/bin/bash # Publish plugins to the self-hosted Gitea repo instead of GitHub. # The manifest must reference Gitea raw URLs, which the upstream script # derives from USER_CONTENT_BASE. set -e GITEA_BASE="${GITEA_BASE:-https://git.marcospaulo.dev.br}" version=$(node -e "console.log(require('./package.json').version);") repo_path=$(git remote get-url origin | sed -E 's#^.*[:/]([^/:]+/[^/]+?)(\.git)?$#\1#; s#\.git$##') export USER_CONTENT_BASE="$GITEA_BASE/$repo_path/raw/branch/plugins/v$version" echo "Manifest base: $USER_CONTENT_BASE" ./scripts/publish-plugins.sh echo "Repository URL for LNReader: $USER_CONTENT_BASE/.dist/plugins.min.json"