diff --git a/CLAUDE.md b/CLAUDE.md index 9ddb5b3..d039e23 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -28,7 +28,7 @@ Use `docs/README.md` as the entrypoint for CC:Tweaked, Advanced Peripherals, and - `startup/servers.lua` starts `/programs`, the shell, and configured servers via `parallel.waitForAll`. - Preserve `periphemu` guards used for CraftOS-PC emulation. -- `install.lua` downloads files listed in `LIST_FILES` from `master`; add shipped files there. +- `install.lua` downloads files listed in `LIST_FILES` from `master` by default, or from `next` with `--beta`; add shipped files there. - Add new servers to `startup/servers.lua` as needed. ## Conventions diff --git a/README.md b/README.md index 6dc6769..b43e977 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,11 @@ wget run https://raw.githubusercontent.com/guillaumearm/cc-libs/master/install.lua ``` +Install the beta branch: +``` +wget run https://raw.githubusercontent.com/guillaumearm/cc-libs/next/install.lua --beta +``` + ## APIs - `/apis/eventloop`: a simple event loop API. - `/apis/net`: an API to simplify sending and receiving routed messages, based on the `eventloop` library. @@ -18,7 +23,7 @@ All servers are automatically started at boot. - `router`: routes messages. You need to set up a router to use all `apis/net`-based programs and libraries. - `ping`: pings machines using `apis/net`. - `events`: emits and logs computer events. -- `upgrade`: upgrades the machine. +- `upgrade`: upgrades the machine. Use `upgrade --beta` to install from the beta branch. ## Development See [DEVELOPMENT.md](./DEVELOPMENT.md) for development setup and workflow. diff --git a/install.lua b/install.lua index 4716c18..355e32d 100644 --- a/install.lua +++ b/install.lua @@ -1,4 +1,4 @@ -local _VERSION = '2.2.0' +local _VERSION = '2.3.0' local LIST_FILES = { -- startup @@ -19,11 +19,15 @@ local function printUsage() print('install usage:'); print(); print('\t\t\twget run '); + print('\t\t\twget run --beta'); end local command = ...; +local branch = 'master'; -if command ~= nil and command ~= '' then +if command == '--beta' or command == '-beta' then + branch = 'next'; +elseif command ~= nil and command ~= '' then printUsage(); return; end @@ -39,7 +43,7 @@ fs.delete('programs/goo.lua'); fs.delete('servers/cube-server.lua'); fs.delete('servers/cube-boot.lua'); -local REPO_PREFIX = 'https://raw.githubusercontent.com/guillaumearm/cc-libs/master/' +local REPO_PREFIX = 'https://raw.githubusercontent.com/guillaumearm/cc-libs/' .. branch .. '/' local previousDir = shell.dir() diff --git a/programs/upgrade.lua b/programs/upgrade.lua index be66bb4..2433a60 100644 --- a/programs/upgrade.lua +++ b/programs/upgrade.lua @@ -1,6 +1,7 @@ -local _VERSION = '1.2.0'; +local _VERSION = '1.3.0'; local INSTALL_URL = 'https://raw.githubusercontent.com/guillaumearm/cc-libs/master/install.lua'; +local BETA_INSTALL_URL = 'https://raw.githubusercontent.com/guillaumearm/cc-libs/next/install.lua'; local command = ...; @@ -8,6 +9,7 @@ local function printUsage() print('upgrade usage:'); print(); print('\t\t\tupgrade'); + print('\t\t\tupgrade --beta'); print('\t\t\tupgrade version'); print('\t\t\tupgrade help'); end @@ -22,6 +24,11 @@ if command == 'help' or command == '-help' or command == '--help' then return; end +if command == '--beta' or command == '-beta' then + shell.execute('wget', 'run', BETA_INSTALL_URL, '--beta'); + return; +end + if command ~= nil and command ~= '' then printUsage(); return;