From a43867dd7d02937a233a039eec7c7f43977b0b0c Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Tue, 22 Jul 2025 05:56:17 +0300 Subject: Release 0.6.0 --- README.org | 1 + build.zig.zon | 17 +++++++++-------- src/install.zig | 2 +- src/main.zig | 6 ++---- src/remove.zig | 2 +- src/switch.zig | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.org b/README.org index 908619a..6fd7d73 100644 --- a/README.org +++ b/README.org @@ -25,6 +25,7 @@ newer (hopefully the newest!) Zig version that should enable you to compile the | 0.12.0 | 0.4.0 | | 0.12.1 | 0.4.0 | | 0.13.0 | 0.5.0 | +| 0.14.0 | 0.6.0 | | master | main | * How diff --git a/build.zig.zon b/build.zig.zon index f22e96a..53324aa 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,22 +1,23 @@ // -*- zig -*- .{ - .name = "zup", - .version = "0.2.1", + .name = .zup, + .version = "0.6.0", + .fingerprint = 0xa46ac81bf4e1cf6e, .paths = .{""}, .dependencies = .{ .clap = .{ - .url = "https://git.enes.lv/zig-clap/snapshot/zig-clap-7003678307b72bc25869308d7435a79114d1ac42.tar.xz", - .hash = "12208caa9e66620e2937cbd9d273e84dbab659c099bea8c985b3d46c2201f8d7c244", + .url = "https://git.enes.lv/zig-clap/snapshot/zig-clap-0.10.0.tar.xz", + .hash = "clap-0.10.0-oBajB434AQBDh-Ei3YtoKIRxZacVPF1iSwp3IX_ZB8f0", }, .libarchive = .{ // .path = "../zig-libarchive", - .url = "https://git.enes.lv/zig-libarchive/snapshot/zig-libarchive-3d457c968af4ddcb3bc89965272b46fc2aa91452.tar.xz", - .hash = "1220c60a6aa308f9541fa460cb42a43c5e011ce141b52bd1e01fd8fac7e347edee60", + .url = "https://git.enes.lv/zig-libarchive/snapshot/zig-libarchive-0.4.1.tar.xz", + .hash = "N-V-__8AAEARAADGCmqjCPlUH6Rgy0KkPF4BHOFBtSvR4B_Y", }, .xdg = .{ // .path = "../zig-xdg", - .url = "https://git.enes.lv/zig-xdg/snapshot/zig-xdg-7a1fe22046e374461c37fb232dca0a1a1733a532.tar.xz", - .hash = "12200288bfff905e157599e189cd44f14d34cbb544e2c126696dbbc71c5ddaf9058e", + .url = "https://git.enes.lv/zig-xdg/snapshot/zig-xdg-0.5.0.tar.xz", + .hash = "N-V-__8AAIIKAAACiL__kF4VdZnhic1E8U00y7VE4sEmaW27", }, }, } diff --git a/src/install.zig b/src/install.zig index de6d8f0..8a16e49 100644 --- a/src/install.zig +++ b/src/install.zig @@ -25,7 +25,7 @@ pub fn main(comptime Result: type, config: Config, res: Result) !void { var available = try Installation.getAvailableList(config); defer Installation.deinitMap(allocator, &available); - return perform(allocator, res.positionals[0], res.args.force != 0, available); + return perform(allocator, res.positionals[0].?, res.args.force != 0, available); } pub fn perform(allocator: Allocator, name: []const u8, force: bool, available: Installations) !void { diff --git a/src/main.zig b/src/main.zig index 0fe6f16..c7e3844 100644 --- a/src/main.zig +++ b/src/main.zig @@ -99,11 +99,9 @@ const Help = struct { pub const max_args = 1; pub fn main(comptime Result: type, _: Config, res: Result) !void { - if (res.positionals.len == 0) { + const cmd = res.positionals[0] orelse { return mainHelp(); - } - - const cmd = res.positionals[0]; + }; return dispatch(cmd, "help", unknownHelp, .{cmd}); } diff --git a/src/remove.zig b/src/remove.zig index bc5b06a..fb53d06 100644 --- a/src/remove.zig +++ b/src/remove.zig @@ -16,7 +16,7 @@ pub const max_args = 1; pub fn main(comptime Result: type, config: Config, res: Result) !void { const allocator = config.allocator; - const name = res.positionals[0]; + const name = res.positionals[0].?; if (!try Installation.isInstalled(allocator, name)) { std.log.err("{s} is not installed!", .{name}); diff --git a/src/switch.zig b/src/switch.zig index 3323332..891c4e0 100644 --- a/src/switch.zig +++ b/src/switch.zig @@ -13,7 +13,7 @@ pub const max_args = 1; pub fn main(comptime Result: type, config: Config, res: Result) !void { const allocator = config.allocator; - const name = res.positionals[0]; + const name = res.positionals[0].?; if (!try Installation.isInstalled(allocator, name)) { std.log.err( "No installation by name {s} found, run `zup install {s}`", -- cgit v1.2.3