| author | |
| committer | |
| log | e16a1f6d945521ff0cd81d6486dbbe86ae7c038f |
| tree | 9502ad89e6f651915cfcb8abad4b40a93170d9d9 |
| parent | cffd3642f4f37d3a10db16a076145dc95141a10e |
3 files changed, 14 insertions(+), 14 deletions(-)
src/common.zig+1-1| ... | ... | @@ -123,7 +123,7 @@ pub fn get_modpath(cachepath: string, d: u.Dep, options: *CollectOptions) !strin |
| 123 | 123 | }, |
| 124 | 124 | .git => { |
| 125 | 125 | if (d.version.len > 0) { |
| 126 | const vers = u.parse_split(u.GitVersionType, "-").do(d.version) catch |e| switch (e) { | |
| 126 | const vers = u.parse_split(u.DepType.GitVersion, "-").do(d.version) catch |e| switch (e) { | |
| 127 | 127 | error.IterEmpty => unreachable, |
| 128 | 128 | error.NoMemberFound => { |
| 129 | 129 | const vtype = d.version[0..std.mem.indexOf(u8, d.version, "-").?]; |
src/util/dep.zig+1-1| ... | ... | @@ -65,7 +65,7 @@ pub const Dep = struct { |
| 65 | 65 | } |
| 66 | 66 | return switch (self.type) { |
| 67 | 67 | .git => blk: { |
| 68 | const vers = try u.parse_split(u.GitVersionType, "-").do(self.version); | |
| 68 | const vers = try u.parse_split(u.DepType.GitVersion, "-").do(self.version); | |
| 69 | 69 | if (vers.id.frozen()) break :blk self.version; |
| 70 | 70 | break :blk try self.type.exact_version(dpath); |
| 71 | 71 | }, |
src/util/dep_type.zig+12-12| ... | ... | @@ -89,18 +89,18 @@ pub const DepType = enum { |
| 89 | 89 | .http => "", |
| 90 | 90 | }; |
| 91 | 91 | } |
| 92 | }; | |
| 93 | 92 | |
| 94 | pub const GitVersionType = enum { | |
| 95 | branch, | |
| 96 | tag, | |
| 97 | commit, | |
| 93 | pub const GitVersion = enum { | |
| 94 | branch, | |
| 95 | tag, | |
| 96 | commit, | |
| 98 | 97 | |
| 99 | pub fn frozen(self: GitVersionType) bool { | |
| 100 | return switch (self) { | |
| 101 | .branch => false, | |
| 102 | .tag => true, | |
| 103 | .commit => true, | |
| 104 | }; | |
| 105 | } | |
| 98 | pub fn frozen(self: GitVersion) bool { | |
| 99 | return switch (self) { | |
| 100 | .branch => false, | |
| 101 | .tag => true, | |
| 102 | .commit => true, | |
| 103 | }; | |
| 104 | } | |
| 105 | }; | |
| 106 | 106 | }; |