-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGitSource.cpp
More file actions
38 lines (31 loc) · 970 Bytes
/
Copy pathGitSource.cpp
File metadata and controls
38 lines (31 loc) · 970 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "runcpp2/Data/GitSource.hpp"
#include "runcpp2/Data/ParseCommon.hpp"
#include "runcpp2/ParseUtil.hpp"
#include "ssLogger/ssLog.hpp"
bool runcpp2::Data::GitSource::ParseYAML_Node(ryml::ConstNodeRef& node)
{
INTERNAL_RUNCPP2_SAFE_START();
std::vector<NodeRequirement> requirements =
{
NodeRequirement("URL", ryml::NodeType_e::KEYVAL, true, false)
};
if(!CheckNodeRequirements(node, requirements))
{
ssLOG_ERROR("GitSource: Failed to meet requirements");
return false;
}
node["URL"] >> URL;
return true;
INTERNAL_RUNCPP2_SAFE_CATCH_RETURN(false);
}
std::string runcpp2::Data::GitSource::ToString(std::string indentation) const
{
std::string out;
out += indentation + "Git:\n";
out += indentation + " URL: " + GetEscapedYAMLString(URL) + "\n";
return out;
}
bool runcpp2::Data::GitSource::Equals(const GitSource& other) const
{
return URL == other.URL;
}