fix(install): keep beta branch support
This commit is contained in:
parent
877764a177
commit
c7d925cf18
@ -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`.
|
- `startup/servers.lua` starts `/programs`, the shell, and configured servers via `parallel.waitForAll`.
|
||||||
- Preserve `periphemu` guards used for CraftOS-PC emulation.
|
- 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.
|
- Add new servers to `startup/servers.lua` as needed.
|
||||||
|
|
||||||
## Conventions
|
## Conventions
|
||||||
|
|||||||
@ -5,6 +5,11 @@
|
|||||||
wget run https://raw.githubusercontent.com/guillaumearm/cc-libs/master/install.lua
|
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
|
||||||
- `/apis/eventloop`: a simple event loop API.
|
- `/apis/eventloop`: a simple event loop API.
|
||||||
- `/apis/net`: an API to simplify sending and receiving routed messages, based on the `eventloop` library.
|
- `/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.
|
- `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`.
|
- `ping`: pings machines using `apis/net`.
|
||||||
- `events`: emits and logs computer events.
|
- `events`: emits and logs computer events.
|
||||||
- `upgrade`: upgrades the machine.
|
- `upgrade`: upgrades the machine. Use `upgrade --beta` to install from the beta branch.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
See [DEVELOPMENT.md](./DEVELOPMENT.md) for development setup and workflow.
|
See [DEVELOPMENT.md](./DEVELOPMENT.md) for development setup and workflow.
|
||||||
|
|||||||
10
install.lua
10
install.lua
@ -1,4 +1,4 @@
|
|||||||
local _VERSION = '2.2.0'
|
local _VERSION = '2.3.0'
|
||||||
|
|
||||||
local LIST_FILES = {
|
local LIST_FILES = {
|
||||||
-- startup
|
-- startup
|
||||||
@ -19,11 +19,15 @@ local function printUsage()
|
|||||||
print('install usage:');
|
print('install usage:');
|
||||||
print();
|
print();
|
||||||
print('\t\t\twget run <install-url>');
|
print('\t\t\twget run <install-url>');
|
||||||
|
print('\t\t\twget run <install-url> --beta');
|
||||||
end
|
end
|
||||||
|
|
||||||
local command = ...;
|
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();
|
printUsage();
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
@ -39,7 +43,7 @@ fs.delete('programs/goo.lua');
|
|||||||
fs.delete('servers/cube-server.lua');
|
fs.delete('servers/cube-server.lua');
|
||||||
fs.delete('servers/cube-boot.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()
|
local previousDir = shell.dir()
|
||||||
|
|
||||||
|
|||||||
@ -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 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 = ...;
|
local command = ...;
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ local function printUsage()
|
|||||||
print('upgrade usage:');
|
print('upgrade usage:');
|
||||||
print();
|
print();
|
||||||
print('\t\t\tupgrade');
|
print('\t\t\tupgrade');
|
||||||
|
print('\t\t\tupgrade --beta');
|
||||||
print('\t\t\tupgrade version');
|
print('\t\t\tupgrade version');
|
||||||
print('\t\t\tupgrade help');
|
print('\t\t\tupgrade help');
|
||||||
end
|
end
|
||||||
@ -22,6 +24,11 @@ if command == 'help' or command == '-help' or command == '--help' then
|
|||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if command == '--beta' or command == '-beta' then
|
||||||
|
shell.execute('wget', 'run', BETA_INSTALL_URL, '--beta');
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
if command ~= nil and command ~= '' then
|
if command ~= nil and command ~= '' then
|
||||||
printUsage();
|
printUsage();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user