diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-11-14 22:18:20 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-11-15 23:06:43 +0300 |
commit | 05912fbf27846af1f4ca1b824cc39815179d430e (patch) | |
tree | 60c44466d29ceed659f11e8ae201d483d253d8ed /libbbot/manifest.cxx | |
parent | 29b5a3d01b5c2228ae1db6c9237989f54f5f2b52 (diff) |
Add support for repository typed URLs (git+https://..., etc)
Diffstat (limited to 'libbbot/manifest.cxx')
-rw-r--r-- | libbbot/manifest.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx index cc8afb5..2f70b75 100644 --- a/libbbot/manifest.cxx +++ b/libbbot/manifest.cxx @@ -581,9 +581,6 @@ namespace bbot if (!repo_url) bad_value ("no task repository URL specified"); - if (!repo_type) - bad_value ("no task repository type specified"); - if (machine.empty ()) bad_value ("no task machine specified"); @@ -594,11 +591,10 @@ namespace bbot // try { - // Call remote/absolute repository location constructor (throws + // Create remote/absolute repository location (will throw // invalid_argument for relative location). // - repository = repository_location (repository_url (repo_url->value), - *repo_type); + repository = repository_location (repo_url->value, repo_type); } catch (const invalid_argument& e) { @@ -624,8 +620,13 @@ namespace bbot s.next ("name", name.string ()); s.next ("version", version.string ()); + + // Note that the repository location is assumed to be remote or absolute, + // and so the URL schema encapsulates the repository type if it is + // unguessable otherwise. Thus we don't serialize the repository-type + // manifest value. + // s.next ("repository-url", repository.string ()); - s.next ("repository-type", to_string (repository.type ())); for (const auto& v: trust) s.next ("trust", v); |