mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 03:57:29 +00:00
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:
parent
ff775330c7
commit
94570c4b60
@ -64,7 +64,7 @@ want to run an example, say `basic_window` run `zig build basic_window`
|
||||
Download and add raylib-zig as a dependency by running the following command in your project root:
|
||||
|
||||
```
|
||||
zig fetch --save https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz
|
||||
zig fetch --save git+https://github.com/Not-Nik/raylib-zig#devel
|
||||
```
|
||||
|
||||
Then add raylib-zig as a dependency and import its modules and artifact in your `build.zig`:
|
||||
|
@ -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"
|
||||
|
@ -57,20 +57,16 @@ pub fn build(b: *std.Build) !void {
|
||||
b.installArtifact(exe);
|
||||
}' >> build.zig
|
||||
|
||||
HASH=$(zig fetch https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz)
|
||||
|
||||
echo '.{
|
||||
.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 = .{""},
|
||||
}' >> build.zig.zon
|
||||
|
||||
zig fetch --save git+https://github.com/Not-Nik/raylib-zig#devel
|
||||
|
||||
mkdir src
|
||||
mkdir resources
|
||||
touch resources/placeholder.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user