nat3Github/zig-lib-update
update tool - a zig dependency utility tool for your remote git dependencies
.dependencies = .{
.update_tool = .{
.url = "git+https://github.com/nat3Github/zig-lib-update#b1383fe265ce7636b374d09b23e6ef67ee4eb46b",
.hash = "update_tool-0.0.0-MwAI-RQUAAAyN5KtivKv0CvCYu_NLd-QRv515tb4xdQ0",
},
// ...
},
const update = @import("update_tool");
const deps: []const update.GitDependency = &.{
.{
// if you leave this the update_tool will update itself
.url = "https://github.com/nat3Github/zig-lib-update",
.branch = "main",
},
.{
// update lib-pffft
.url = "https://github.com/nat3Github/zig-lib-osmr",
.branch = "zig",
},
// add more dependencies here
};
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
if (update.updateDependencies(b, deps, .{
.name = "update",
.optimize = optimize,
.target = target,
})) return;
zig build -Dupdate
to invoke the update toolthis is licensed Public Domain or BSD-0 or MIT. Use it to your liking!