Skip to content

Commit

Permalink
fix: port's build.zig.zon
Browse files Browse the repository at this point in the history
  • Loading branch information
tensorush committed Jul 20, 2024
1 parent efbf318 commit fecc4fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/liza.zig
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ pub fn initialize(
.exe => {
try createCi(EXE_CI_STEP, workflows_dir);
try createPlain(EXE_ROOT, EXE_TEXT, src_dir);
try createBuild(.zig, .exe, repo_name, code_vrsn, repo_dir);
try createBuild(.zon, .exe, repo_name, code_vrsn_str, repo_dir);
try createBuild(.zig, .exe, repo_name, user_hndl, code_vrsn, repo_dir);
try createBuild(.zon, .exe, repo_name, user_hndl, code_vrsn_str, repo_dir);
try createReadme(EXE_README, repo_name, repo_desc, user_hndl, repo_dir);
},
.lib => {
Expand All @@ -107,15 +107,15 @@ pub fn initialize(
try createPlain(LIB_ROOT, LIB_TEXT, src_dir);
try createPlain(EXE_ROOT, LIB_EXAMPLE1, example1_dir);
try createPlain(EXE_ROOT, LIB_EXAMPLE2, example2_dir);
try createBuild(.zig, .lib, repo_name, code_vrsn, repo_dir);
try createBuild(.zon, .lib, repo_name, code_vrsn_str, repo_dir);
try createBuild(.zig, .lib, repo_name, user_hndl, code_vrsn, repo_dir);
try createBuild(.zon, .lib, repo_name, user_hndl, code_vrsn_str, repo_dir);
try createReadme(LIB_README, repo_name, repo_desc, user_hndl, repo_dir);
},
.prt => {
try createCi(PRT_CI_STEP, workflows_dir);
try createPlain(LIB_ROOT, PRT_TEXT, src_dir);
try createBuild(.zig, .prt, repo_name, code_vrsn, repo_dir);
try createBuild(.zon, .prt, repo_name, code_vrsn_str, repo_dir);
try createBuild(.zig, .prt, repo_name, user_hndl, code_vrsn, repo_dir);
try createBuild(.zon, .prt, repo_name, user_hndl, code_vrsn_str, repo_dir);
try createReadme(PRT_README, repo_name, repo_desc, user_hndl, repo_dir);
},
}
Expand Down Expand Up @@ -148,6 +148,7 @@ fn createBuild(
comptime mode: std.zig.Ast.Mode,
comptime codebase: Codebase,
repo_name: []const u8,
user_hndl: []const u8,
version: anytype,
repo_dir: std.fs.Dir,
) !void {
Expand All @@ -172,6 +173,7 @@ fn createBuild(
),
.zon => try build_writer.writeAll(version),
},
'u' => try build_writer.writeAll(user_hndl),
else => try build_writer.writeAll(text[idx + i .. idx + i + 2]),
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/prt/build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
.minimum_zig_version = "0.13.0",
.dependencies = .{
.?r = .{
.url = "",
.hash = "",
.url = "https://github.com/?u/?r/archive/<git_tag_or_commit_hash>.tar.gz",
.hash = "12200000000000000000000000000000000000000000000000000000000000000000",
},
},
.paths = .{
Expand Down

0 comments on commit fecc4fe

Please sign in to comment.