1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-27 20:18:01 +02:00

Beef custom properties proof of concept implementation.

This commit is contained in:
LAPTOP-NV8MPI8C\Yuvan Wickramasinghe 2025-02-10 20:06:22 -08:00
parent 549c9c7d17
commit 803b9890e2
No known key found for this signature in database
4 changed files with 120 additions and 1 deletions

View file

@ -110,6 +110,7 @@ namespace BeefBuild
{
mWorkspace.mName = new String();
Path.GetFileName(mWorkspace.mDir, mWorkspace.mName);
LoadProperties();
LoadWorkspace(mVerb);
}
else
@ -303,6 +304,21 @@ namespace BeefBuild
if (mPackMan.mCleanHashSet.TryAddAlt(value, var entryPtr))
*entryPtr = new .(value);
return true;
case "-property":
int splitIdx = (int)value.IndexOf('=');
if (splitIdx != -1)
{
String propertyKey = new String();
StringView propertyKeyView = value.Substring(0, splitIdx);
propertyKeyView.ToString(propertyKey);
String propertyValue = new String();
StringView propertyValueView = value.Substring(splitIdx + 1, value.Length - splitIdx - 1);
propertyValueView.ToString(propertyValue);
mCustomProperties.Add(propertyKey, propertyValue);
return true;
}
}
}