fix zig fetch command in README (#130)

* fix zig fetch command in README

All URLs within build.zig.zon files must point to archives that never
change.  However, the zig fetch command in the README.md adds a URL
that points to the `devel` git branch whose content changes whenever
the `devel` branch is updated.

I've updated the README a url that zig will resolve to a SHA before it
writes it to the zon file.

* Update template scripts

---------

Co-authored-by: Not-Nik <nik.wipper@gmx.de>
This commit is contained in:
Jonathan Marler 2024-11-25 06:19:38 -07:00 committed by GitHub
parent ff775330c7
commit 94570c4b60
Failed to generate hash of commit
3 changed files with 5 additions and 13 deletions

View file

@ -61,22 +61,18 @@ pub fn build(b: *std.Build) !void {
New-Item -Name "build.zig" -ItemType "file" -Value $BUILD_DOT_ZIG -Force
$HASH = $(zig fetch https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz)
$ZON_FILE = @"
.{
.name = "$PROJECT_NAME",
.version = "0.0.1",
.dependencies = .{
.@"raylib-zig" = .{
.url = "https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz",
.hash = "$HASH",
},
},
.paths = .{""},
}
"@
zig fetch --save git+https://github.com/Not-Nik/raylib-zig#devel
New-Item -Name "build.zig.zon" -ItemType "file" -Value $ZON_FILE -Force
New-Item -Name "src" -ItemType "directory"