From 3ea21dfb60eaa7ded7f569e1ec5f7cc430278c98 Mon Sep 17 00:00:00 2001 From: Prophet731 Date: Sun, 26 Apr 2026 02:27:48 -0400 Subject: [PATCH] docs: switch install/upgrade instructions to release tarballs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the `git clone` of main with a GitHub release-tarball fetch. Defaults to the latest published release (resolved live via the GitHub API) and accepts a `VERSION=vX.Y.Z` override for pinning to a specific release or rolling back. Only depends on curl/sed/tar/rsync — no jq, gh CLI, or git client required. Cloning main was a footgun: anyone who ran the install snippet between v1.4.0 and the v1.4.1 fix would have shipped the qty-zeroing storage matcher even though the documented "stable" version was v1.4.0. Pulling release tarballs aligns what the docs say with what the user actually gets. --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9c1e5ff..bccb289 100644 --- a/README.md +++ b/README.md @@ -132,12 +132,15 @@ You also need a VirtFusion API token with the following permissions: ```bash WHMCS=/path/to/whmcs -git clone https://github.com/EZSCALE/virtfusion-whmcs-module.git /tmp/vf \ +VERSION=${VERSION:-$(curl -fsSL https://api.github.com/repos/EZSCALE/virtfusion-whmcs-module/releases/latest \ + | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')} +curl -fsSL "https://github.com/EZSCALE/virtfusion-whmcs-module/archive/refs/tags/${VERSION}.tar.gz" -o /tmp/vf.tar.gz \ + && mkdir -p /tmp/vf && tar -xzf /tmp/vf.tar.gz -C /tmp/vf --strip-components=1 \ && rsync -ahP --delete /tmp/vf/modules/servers/VirtFusionDirect/ "$WHMCS/modules/servers/VirtFusionDirect/" \ - && rm -rf /tmp/vf + && rm -rf /tmp/vf /tmp/vf.tar.gz ``` -Set `WHMCS` once at the top — it's reused in every path below. The database table, schema migrations, and custom fields are all created automatically on first load. +Set `WHMCS` once at the top — it's reused in every path below. The snippet defaults to the latest published release (queried live from the GitHub API); to pin a specific version, prepend `VERSION=v1.4.1` (or any tag from [Releases](https://github.com/EZSCALE/virtfusion-whmcs-module/releases)) before the command. The database table, schema migrations, and custom fields are all created automatically on first load. Then configure in WHMCS Admin: @@ -151,14 +154,19 @@ That's it. Hooks activate automatically and custom fields are created on module ```bash WHMCS=/path/to/whmcs -git clone https://github.com/EZSCALE/virtfusion-whmcs-module.git /tmp/vf \ +VERSION=${VERSION:-$(curl -fsSL https://api.github.com/repos/EZSCALE/virtfusion-whmcs-module/releases/latest \ + | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')} +curl -fsSL "https://github.com/EZSCALE/virtfusion-whmcs-module/archive/refs/tags/${VERSION}.tar.gz" -o /tmp/vf.tar.gz \ + && mkdir -p /tmp/vf && tar -xzf /tmp/vf.tar.gz -C /tmp/vf --strip-components=1 \ && rsync -ahP --delete /tmp/vf/modules/servers/VirtFusionDirect/ "$WHMCS/modules/servers/VirtFusionDirect/" \ && rsync -ahP --delete /tmp/vf/modules/addons/VirtFusionDns/ "$WHMCS/modules/addons/VirtFusionDns/" \ - && rm -rf /tmp/vf + && rm -rf /tmp/vf /tmp/vf.tar.gz ``` The second `rsync` line is only needed if you use the Reverse DNS addon; skip it otherwise. Addon settings live in `tbladdonmodules` and survive file updates. +The default behavior pulls the latest release. To pin a specific version (e.g. for a controlled rollout, or to roll back to a known-good version), prepend `VERSION=v1.4.1` (or any tag from [Releases](https://github.com/EZSCALE/virtfusion-whmcs-module/releases)) before the command. + > **Note:** If you have a custom `config/ConfigOptionMapping.php`, back it up first — `--delete` will remove it. Restore it after upgrading. If you use theme-overridden templates, review them for any new template variables. Clear the WHMCS template cache after upgrading: **Configuration > System Settings > General Settings > clear template cache**.