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>
This commit is contained in:
masi
2026-09-25 12:08:46 -03:00
parent 9e7ff49f3e
commit c8aad99606
3 changed files with 19 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/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"