From fecc4fe4b6692280e1a371db41be6e1dd4805b99 Mon Sep 17 00:00:00 2001 From: Jora Troosh Date: Sat, 20 Jul 2024 20:04:56 +0300 Subject: [PATCH] fix: port's build.zig.zon --- src/liza.zig | 14 ++++++++------ src/templates/prt/build.zig.zon | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/liza.zig b/src/liza.zig index 9046703..5665550 100644 --- a/src/liza.zig +++ b/src/liza.zig @@ -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 => { @@ -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); }, } @@ -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 { @@ -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]), } } diff --git a/src/templates/prt/build.zig.zon b/src/templates/prt/build.zig.zon index 163ad01..2d6cc1f 100644 --- a/src/templates/prt/build.zig.zon +++ b/src/templates/prt/build.zig.zon @@ -4,8 +4,8 @@ .minimum_zig_version = "0.13.0", .dependencies = .{ .?r = .{ - .url = "", - .hash = "", + .url = "https://github.com/?u/?r/archive/.tar.gz", + .hash = "12200000000000000000000000000000000000000000000000000000000000000000", }, }, .paths = .{