mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-07-30 17:25:58 -04:00
update: remove nightly channel check
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
|
||||
const std = @import("std");
|
||||
const lp = @import("lightpanda");
|
||||
const Updater = lp.Updater;
|
||||
const log = lp.log;
|
||||
const builtin = @import("builtin");
|
||||
const zenai = @import("zenai");
|
||||
@@ -189,10 +188,6 @@ fn injectScriptFileValidator(
|
||||
return list.append(allocator, bytes);
|
||||
}
|
||||
|
||||
fn nightlyChannelValidator(_: Allocator, _: *std.process.ArgIterator) !Updater.Channel {
|
||||
return .nightly;
|
||||
}
|
||||
|
||||
/// Definition for all the commands and its arguments. See @cli.zig for further.
|
||||
const Commands = cli.Builder(.{
|
||||
.{
|
||||
@@ -267,20 +262,7 @@ const Commands = cli.Builder(.{
|
||||
},
|
||||
.shared_options = CommonOptions,
|
||||
},
|
||||
.{
|
||||
.name = "update",
|
||||
.options = .{
|
||||
.{
|
||||
.name = "channel",
|
||||
.type = Updater.Channel,
|
||||
.default = .stable,
|
||||
.variants = .{
|
||||
.{ .name = "nightly", .validator = nightlyChannelValidator },
|
||||
},
|
||||
},
|
||||
},
|
||||
.shared_options = CommonOptions,
|
||||
},
|
||||
.{ .name = "update", .options = .{}, .shared_options = CommonOptions },
|
||||
.{ .name = "version", .options = .{} },
|
||||
});
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ fn dumpContent(app: *App, mode: Config.DumpFormat, dump_opts: dump.Opts, frame:
|
||||
}
|
||||
|
||||
/// Check `Config.zig` for `options`.
|
||||
pub fn update(allocator: std.mem.Allocator, config: *const Config, options: anytype) !void {
|
||||
pub fn update(allocator: std.mem.Allocator, config: *const Config) !void {
|
||||
var client = try Updater.init(allocator, config);
|
||||
defer client.deinit();
|
||||
|
||||
@@ -235,7 +235,7 @@ pub fn update(allocator: std.mem.Allocator, config: *const Config, options: anyt
|
||||
var writer = stdout.writer(&buf);
|
||||
const w = &writer.interface;
|
||||
// Inform to stdout about version.
|
||||
try client.inform(options.channel, w);
|
||||
try client.inform(w);
|
||||
}
|
||||
|
||||
// Writes a single page's result object. Framing (the enclosing array and any
|
||||
|
||||
@@ -80,8 +80,8 @@ fn run(allocator: Allocator, main_arena: Allocator) !void {
|
||||
try lp.Agent.listModels(allocator, opts);
|
||||
return std.process.cleanExit();
|
||||
},
|
||||
.update => |options| {
|
||||
try lp.update(allocator, &args, options);
|
||||
.update => {
|
||||
try lp.update(allocator, &args);
|
||||
return std.process.cleanExit();
|
||||
},
|
||||
else => {},
|
||||
|
||||
Reference in New Issue
Block a user