Files
masi c8aad99606 chore: publish plugins to self-hosted Gitea
Add publish:gitea wrapper that sets USER_CONTENT_BASE to Gitea raw URLs,
and resolve the lockfile's npmmirror tarballs from registry.npmjs.org.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 12:08:46 -03:00

16 lines
650 B
Bash
Executable File

#!/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"