Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ members = [
]

[workspace.package]
version = "0.2.30"
version = "0.2.31"
edition = "2024"
license = "MIT"
repository = "https://github.com/profullstack/c0mpute"
Expand Down
2 changes: 1 addition & 1 deletion apps/tui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@c0mpute/tui",
"version": "0.2.30",
"version": "0.2.31",
"private": true,
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c0mpute",
"version": "0.2.30",
"version": "0.2.31",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/releases/latest.json/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const dynamic = "force-dynamic";
* this in sync with the workspace version in `Cargo.toml` on each release so a
* freshly built CLI reports "already latest" rather than a phantom upgrade.
*/
const FALLBACK_VERSION = "0.2.30";
const FALLBACK_VERSION = "0.2.31";
const FALLBACK_MIN_REQUIRED = "0.0.1";

type Channel = "stable" | "beta" | "nightly";
Expand Down
24 changes: 17 additions & 7 deletions node/crates/c0mpute-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2665,6 +2665,12 @@ const PLUGIN_UPDATERS: &[(&str, &[&str])] =
fn upgrade_plugins_foreground() {
for (bin, args) in PLUGIN_UPDATERS {
if let Some(path) = which_on_path(bin) {
// `infernet update` restarts the daemon from this shell; under infernet.service that
// starts a second daemon beside systemd's, and the daemon updates itself anyway.
if *bin == "infernet" && infernet_systemd_managed() {
println!("→ infernet is managed by infernet.service (it updates itself); skipping");
continue;
}
println!("→ upgrading {bin}…");
match Command::new(path).args(*args).status() {
Ok(s) if s.success() => println!(" ✓ {bin} up to date"),
Expand Down Expand Up @@ -2704,13 +2710,17 @@ fn refresh_plugins() {
/// (and the daemon auto-updates itself), so the worker must not start, update or restart another
/// one: two daemons on one config dir fight over the socket, port and pidfile.
fn infernet_systemd_managed() -> bool {
Command::new("systemctl")
.args(["is-active", "--quiet", "infernet.service"])
.stdin(std::process::Stdio::null())
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::null())
.status()
.is_ok_and(|s| s.success())
// Enabled, not only active: during the unit's own restart it is briefly "activating", and the
// worker must not slip a second daemon in then.
["is-enabled", "is-active"].iter().any(|verb| {
Command::new("systemctl")
.args([*verb, "--quiet", "infernet.service"])
.stdin(std::process::Stdio::null())
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::null())
.status()
.is_ok_and(|s| s.success())
})
}

/// npm package the infernet installer pulls (`npm install -g @infernetprotocol/cli`).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c0mpute-monorepo",
"version": "0.2.30",
"version": "0.2.31",
"private": true,
"workspaces": [
"apps/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@c0mpute/shared",
"version": "0.2.30",
"version": "0.2.31",
"private": true,
"type": "module",
"main": "./dist/index.js",
Expand Down
Loading