From 3a18a355e31df581c4e3b8c432bd8d5c34ea0e5c Mon Sep 17 00:00:00 2001 From: Not-Nik Date: Wed, 15 May 2024 22:36:08 +0200 Subject: [PATCH] Automatically fetch hash in project setup --- project_setup.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/project_setup.sh b/project_setup.sh index bfb0a78..9caedbc 100755 --- a/project_setup.sh +++ b/project_setup.sh @@ -55,8 +55,9 @@ pub fn build(b: *std.Build) !void { run_step.dependOn(&run_cmd.step); b.installArtifact(exe); -} -' >> build.zig +}' >> build.zig + +HASH=$(zig fetch https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz) echo '.{ .name = "'$PROJECT_NAME'", @@ -64,14 +65,11 @@ echo '.{ .dependencies = .{ .@"raylib-zig" = .{ .url = "https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz", - .hash = "12000000000000000000000000000000000000000000000000000000000000000000", + .hash = "'$HASH'", }, }, .paths = .{""}, -} -' >> build.zig.zon - -echo "Please manually update the dependency hash!" +}' >> build.zig.zon mkdir src cp ../examples/core/basic_window.zig src/main.zig