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
+2 -2
View File
@@ -4943,7 +4943,7 @@
}, },
"node_modules/domhandler": { "node_modules/domhandler": {
"version": "5.0.3", "version": "5.0.3",
"resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-5.0.3.tgz", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
"dev": true, "dev": true,
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
@@ -12590,7 +12590,7 @@
}, },
"domhandler": { "domhandler": {
"version": "5.0.3", "version": "5.0.3",
"resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-5.0.3.tgz", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
"dev": true, "dev": true,
"requires": { "requires": {
+2 -1
View File
@@ -24,7 +24,8 @@
"format:check": "prettier --check \"./**/*.{js,ts}\"", "format:check": "prettier --check \"./**/*.{js,ts}\"",
"check:sites": "node scripts/check-plugin-sites.js", "check:sites": "node scripts/check-plugin-sites.js",
"check:plugin": "node scripts/live-check-plugin.js", "check:plugin": "node scripts/live-check-plugin.js",
"prepare": "husky" "prepare": "husky",
"publish:gitea": "./scripts/publish-gitea.sh"
}, },
"author": "LNReader", "author": "LNReader",
"license": "MIT", "license": "MIT",
+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"