diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-11 13:35:50 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-11 13:35:50 +0300 |
commit | 7f86ee1fd487cb7fd4a1b76949951ad8e4b8b69d (patch) | |
tree | 37b16ec7a392f4ed94d2a9a1aaa63d4214f3b155 /libbpkg/manifest.cxx | |
parent | 1b192351dc0ef09423ee9a40d68bacc3137c9aec (diff) |
Add support for package project manifest value
Diffstat (limited to 'libbpkg/manifest.cxx')
-rw-r--r-- | libbpkg/manifest.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx index c2d7eee..b4b1fa5 100644 --- a/libbpkg/manifest.cxx +++ b/libbpkg/manifest.cxx @@ -993,6 +993,20 @@ namespace bpkg if (m.version.release && m.version.release->empty ()) bad_value ("invalid package version release"); } + else if (n == "project") + { + if (m.project) + bad_name ("package project redefinition"); + + try + { + m.project = package_name (move (v)); + } + catch (const invalid_argument& e) + { + bad_value (string ("invalid project name: ") + e.what ()); + } + } else if (n == "summary") { if (!m.summary.empty ()) @@ -1399,6 +1413,9 @@ namespace bpkg s.next ("name", name.string ()); s.next ("version", version.string ()); + if (project) + s.next ("project", project->string ()); + if (priority) { size_t v (*priority); |