[M8] cargoxx-git dependencies: { git = ..., rev = ... } deps
This commit is contained in:
@@ -112,6 +112,15 @@ auto parse_package(const toml::table& tbl, const std::filesystem::path& path)
|
||||
if (auto v = tbl["source_path"].value<std::string>()) {
|
||||
pkg.source_path = *v;
|
||||
}
|
||||
if (auto v = tbl["source_git_url"].value<std::string>()) {
|
||||
pkg.source_git_url = *v;
|
||||
}
|
||||
if (auto v = tbl["source_git_commit"].value<std::string>()) {
|
||||
pkg.source_git_commit = *v;
|
||||
}
|
||||
if (auto v = tbl["source_git_sha256"].value<std::string>()) {
|
||||
pkg.source_git_sha256 = *v;
|
||||
}
|
||||
|
||||
return pkg;
|
||||
}
|
||||
@@ -227,6 +236,15 @@ auto write(const Lockfile& lock, const std::filesystem::path& path) -> util::Res
|
||||
if (p.source_path) {
|
||||
tbl.insert_or_assign("source_path", *p.source_path);
|
||||
}
|
||||
if (p.source_git_url) {
|
||||
tbl.insert_or_assign("source_git_url", *p.source_git_url);
|
||||
}
|
||||
if (p.source_git_commit) {
|
||||
tbl.insert_or_assign("source_git_commit", *p.source_git_commit);
|
||||
}
|
||||
if (p.source_git_sha256) {
|
||||
tbl.insert_or_assign("source_git_sha256", *p.source_git_sha256);
|
||||
}
|
||||
packages.push_back(std::move(tbl));
|
||||
}
|
||||
root.insert_or_assign("package", std::move(packages));
|
||||
|
||||
Reference in New Issue
Block a user