From f8ae24e87b3367da2a2258a4eef7dfbe0d6c864e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 22 Nov 2025 22:35:31 +0000 Subject: [PATCH] Refactor deploy/push scripts and enhance game docs generator - Add comprehensive headers to deploy_gsp.sh and push_to_github.sh - Make scripts configurable via environment variables - Update push_to_github.sh to support GITHUB_TOKEN env var - Enhance generate_game_docs.py with: * Command-line argument support (--games, --force, --todo-only) * Extraction of detailed startup parameters from XML * Prevention of overwriting existing files unless --force is used * Comprehensive parameter documentation with options and defaults Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> --- deploy_gsp.sh | 36 ++++ modules/billing/docs/rust/index.php | 180 +++++++++------- push_to_github.sh | 76 ++++++- tools/generate_game_docs.py | 314 ++++++++++++++++++++++++++-- 4 files changed, 498 insertions(+), 108 deletions(-) diff --git a/deploy_gsp.sh b/deploy_gsp.sh index c4606de6..fafc0a7e 100644 --- a/deploy_gsp.sh +++ b/deploy_gsp.sh @@ -1,4 +1,40 @@ #!/usr/bin/env bash +# +# GSP Deployment Script +# ===================== +# This script deploys the Game Server Panel (GSP) from GitHub to a web server. +# +# HOW IT WORKS: +# 1. Clones/updates the GSP repository to a staging directory +# 2. Syncs files to the web root using rsync (preserving configs) +# 3. Sets proper permissions for OGP panel operation +# +# CONFIGURATION: +# All settings can be configured via environment variables or by editing +# the defaults in the "Config" section below. +# +# ENVIRONMENT VARIABLES: +# - REPO_URL: Git repository URL (default: https://github.com/GameServerPanel/GSP.git) +# - STAGE_DIR: Staging directory for git clone (default: $HOME/gsp_stage) +# - WEB_ROOT: Live web server directory (default: /var/www/html/panel) +# - OWNER: File owner user (default: www-data) +# - GROUP: File owner group (default: www-data) +# - SUDO: Command prefix for privilege escalation (default: sudo, set empty to skip) +# - DRY_RUN: Set to 1 to test without making changes (default: 0) +# +# EXAMPLE USAGE: +# # Use defaults: +# ./deploy_gsp.sh +# +# # Custom web root: +# WEB_ROOT=/home/panel/public_html ./deploy_gsp.sh +# +# # Dry run to test: +# DRY_RUN=1 ./deploy_gsp.sh +# +# # Different user/group: +# OWNER=apache GROUP=apache ./deploy_gsp.sh +# set -Eeuo pipefail umask 022 diff --git a/modules/billing/docs/rust/index.php b/modules/billing/docs/rust/index.php index e6cbd525..26816d53 100644 --- a/modules/billing/docs/rust/index.php +++ b/modules/billing/docs/rust/index.php @@ -26,7 +26,7 @@

Quick Info