feat: add configurable COMMUNITY_SCRIPTS_URL for dev sourcing (#1449)

- Replace all hardcoded source URLs with $COMMUNITY_SCRIPTS_URL variable
- Default: https://git.community-scripts.org/.../ProxmoxVED/raw/branch/main
- Override: export COMMUNITY_SCRIPTS_URL=https://.../your-fork/raw/branch/xyz
- Propagates into container via build.func exports
- Updated: 43 ct scripts, 14 deferred, 22 vm scripts, 5 func files
- Document in docs/DEV_MODE.md with usage examples
- Also normalizes legacy GitHub URLs to Gitea canonical URL
This commit is contained in:
MickLesk
2026-02-22 14:36:23 +01:00
parent 719473f522
commit 4b9121f41c
84 changed files with 137 additions and 105 deletions

View File

@@ -294,6 +294,29 @@ bash -c "$(curl ...)"
## Environment Variables Reference
### Source URL Override
- `COMMUNITY_SCRIPTS_URL` (string): Base URL for sourcing all scripts and functions
- Default: `https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main`
- Override to point to your own fork/branch during development
```bash
# Use your own Gitea fork/branch
export COMMUNITY_SCRIPTS_URL="https://git.community-scripts.org/myuser/ProxmoxVED/raw/branch/my-feature"
bash -c "$(curl -fsSL $COMMUNITY_SCRIPTS_URL/ct/debian.sh)"
# Use a GitHub fork
export COMMUNITY_SCRIPTS_URL="https://raw.githubusercontent.com/myuser/ProxmoxVED/my-branch"
bash -c "$(curl -fsSL $COMMUNITY_SCRIPTS_URL/ct/debian.sh)"
# Combined with dev modes
export COMMUNITY_SCRIPTS_URL="https://git.community-scripts.org/myuser/ProxmoxVED/raw/branch/fix-xyz"
export dev_mode="keep,trace"
bash -c "$(curl -fsSL $COMMUNITY_SCRIPTS_URL/ct/myapp.sh)"
```
This single variable controls where **all** scripts and functions are sourced from — including `build.func`, `install.func`, `core.func`, `tools.func`, and the `install/<app>-install.sh` scripts inside the container. No need to modify individual files.
### Dev Mode Variables
- `dev_mode` (string): Comma-separated list of modes