aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorVictor Romero <romerosanchezv@gmail.com>2021-01-14 08:57:05 -0800
committerGitHub <noreply@github.com>2021-01-14 08:57:05 -0800
commitfb21b708461641927290976adb2b7eee21b5748e (patch)
tree81c07f50dfcb616139efe531a7e7cf48e2135822 /toolsrc/include
parent3f3d9a615a4f86ce892613885f00ca315cfe1e7e (diff)
downloadvcpkg-fb21b708461641927290976adb2b7eee21b5748e.tar.gz
vcpkg-fb21b708461641927290976adb2b7eee21b5748e.zip
[vcpkg] Change version field in `baseline.json` (#15633)
* [vcpkg] Change version field in `baseline.json` * Change name from `version-tag` to `baseline` * [vcpkg] x-history serializes version scheme * Update e2e tests * Update baseline e2e test
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/registries.h4
-rw-r--r--toolsrc/include/vcpkg/sourceparagraph.h5
-rw-r--r--toolsrc/include/vcpkg/versiondeserializers.h1
3 files changed, 8 insertions, 2 deletions
diff --git a/toolsrc/include/vcpkg/registries.h b/toolsrc/include/vcpkg/registries.h
index c36c0179d..74782859d 100644
--- a/toolsrc/include/vcpkg/registries.h
+++ b/toolsrc/include/vcpkg/registries.h
@@ -106,8 +106,8 @@ namespace vcpkg
std::unique_ptr<Json::IDeserializer<std::vector<Registry>>> get_registry_array_deserializer(
const fs::path& configuration_directory);
- ExpectedS<std::vector<std::pair<VersionT, std::string>>> get_builtin_versions(const VcpkgPaths& paths,
- StringView port_name);
+ ExpectedS<std::vector<std::pair<SchemedVersion, std::string>>> get_builtin_versions(const VcpkgPaths& paths,
+ StringView port_name);
ExpectedS<std::map<std::string, VersionT, std::less<>>> get_builtin_baseline(const VcpkgPaths& paths);
}
diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h
index 50417b8ad..f2dd0798b 100644
--- a/toolsrc/include/vcpkg/sourceparagraph.h
+++ b/toolsrc/include/vcpkg/sourceparagraph.h
@@ -12,6 +12,7 @@
#include <vcpkg/packagespec.h>
#include <vcpkg/paragraphparser.h>
#include <vcpkg/platform-expression.h>
+#include <vcpkg/versiondeserializers.h>
#include <vcpkg/versions.h>
namespace vcpkg
@@ -107,6 +108,10 @@ namespace vcpkg
const FeatureFlagSettings& flags) const;
VersionT to_versiont() const { return core_paragraph->to_versiont(); }
+ SchemedVersion to_schemed_version() const
+ {
+ return SchemedVersion{core_paragraph->version_scheme, core_paragraph->to_versiont()};
+ }
friend bool operator==(const SourceControlFile& lhs, const SourceControlFile& rhs);
friend bool operator!=(const SourceControlFile& lhs, const SourceControlFile& rhs) { return !(lhs == rhs); }
diff --git a/toolsrc/include/vcpkg/versiondeserializers.h b/toolsrc/include/vcpkg/versiondeserializers.h
index 02696d39b..ae368f6c5 100644
--- a/toolsrc/include/vcpkg/versiondeserializers.h
+++ b/toolsrc/include/vcpkg/versiondeserializers.h
@@ -11,6 +11,7 @@
namespace vcpkg
{
Json::IDeserializer<VersionT>& get_versiont_deserializer_instance();
+ Json::IDeserializer<VersionT>& get_versiontag_deserializer_instance();
std::unique_ptr<Json::IDeserializer<std::string>> make_version_deserializer(StringLiteral type_name);
struct SchemedVersion