fix: use Gitea authenticated download for WP plugin zips (GitHub repo is private)
This commit is contained in:
@@ -80,15 +80,28 @@ docker compose run --rm wpcli rewrite structure '/%postname%/' --hard 2>/dev/nul
|
|||||||
# ── Install plugins ───────────────────────────────────────────────────────────
|
# ── Install plugins ───────────────────────────────────────────────────────────
|
||||||
echo "── Installing Falah plugins ──"
|
echo "── Installing Falah plugins ──"
|
||||||
|
|
||||||
# Falah Shortcodes from GitHub raw
|
GITEA_BASE="https://git.falahos.my/falahos/falah-os-ce/raw/branch/community-edition/wordpress-plugins"
|
||||||
docker compose run --rm wpcli plugin install \
|
GITEA_TOKEN="${GITEA_TOKEN:-81dad6b01711baff0f23218dd3fd53d60e97751b}"
|
||||||
"https://github.com/maifors/falah-os/raw/community-edition/wordpress-plugins/falah-shortcodes.zip" \
|
|
||||||
--activate --force 2>/dev/null && echo " falah-shortcodes ✅" || echo " falah-shortcodes: upload manually"
|
|
||||||
|
|
||||||
# Hermes AI Bridge from GitHub raw
|
# Download zips locally (WP-CLI can't auth via header, so pre-download)
|
||||||
docker compose run --rm wpcli plugin install \
|
curl -sL -H "Authorization: token $GITEA_TOKEN" \
|
||||||
"https://github.com/maifors/falah-os/raw/community-edition/wordpress-plugins/hermes-ai-bridge.zip" \
|
"$GITEA_BASE/falah-shortcodes.zip" -o /tmp/falah-shortcodes.zip
|
||||||
|
curl -sL -H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
"$GITEA_BASE/hermes-ai-bridge.zip" -o /tmp/hermes-ai-bridge.zip
|
||||||
|
|
||||||
|
# Copy zips into the WP container volume mount
|
||||||
|
WP_VOLUME=$(docker volume inspect ummah-wordpress_ummah2-wp-data --format '{{.Mountpoint}}' 2>/dev/null || echo "")
|
||||||
|
if [ -n "$WP_VOLUME" ]; then
|
||||||
|
cp /tmp/falah-shortcodes.zip "$WP_VOLUME/falah-shortcodes.zip"
|
||||||
|
cp /tmp/hermes-ai-bridge.zip "$WP_VOLUME/hermes-ai-bridge.zip"
|
||||||
|
docker compose run --rm wpcli plugin install /var/www/html/falah-shortcodes.zip \
|
||||||
|
--activate --force 2>/dev/null && echo " falah-shortcodes ✅" || echo " falah-shortcodes: upload manually"
|
||||||
|
docker compose run --rm wpcli plugin install /var/www/html/hermes-ai-bridge.zip \
|
||||||
--activate --force 2>/dev/null && echo " hermes-ai-bridge ✅" || echo " hermes-ai-bridge: upload manually"
|
--activate --force 2>/dev/null && echo " hermes-ai-bridge ✅" || echo " hermes-ai-bridge: upload manually"
|
||||||
|
rm -f "$WP_VOLUME/falah-shortcodes.zip" "$WP_VOLUME/hermes-ai-bridge.zip"
|
||||||
|
else
|
||||||
|
echo " ⚠️ Volume not found — install plugins manually from /tmp/*.zip"
|
||||||
|
fi
|
||||||
|
|
||||||
# Essential WP.org plugins
|
# Essential WP.org plugins
|
||||||
echo "── Installing WP.org plugins ──"
|
echo "── Installing WP.org plugins ──"
|
||||||
|
|||||||
Reference in New Issue
Block a user