Stabilized date in generated profiles
This commit is contained in:
parent
878cfbb48f
commit
b9cb0ef632
6 changed files with 59 additions and 91 deletions
|
@ -1,8 +1,8 @@
|
||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=46c4a96e_002D61f1_002D4d55_002Da7ff_002D649a683870dc/@EntryIndexedValue"><SessionState ContinuousTestingIsOn="False" ContinuousTestingMode="0" FrameworkVersion="{x:Null}" IsLocked="False" Name="ParseFunction_Duration_TotalMinutes" PlatformMonoPreference="{x:Null}" PlatformType="{x:Null}" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=46c4a96e_002D61f1_002D4d55_002Da7ff_002D649a683870dc/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" Name="ParseFunction_Duration_TotalMinutes" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||||
<Project Location="/home/pietervdvn/werk/AspectedRouting/AspectedRouting.Test" Presentation="&lt;AspectedRouting.Test&gt;" />
|
<Project Location="/home/pietervdvn/werk/AspectedRouting/AspectedRouting.Test" Presentation="&lt;AspectedRouting.Test&gt;" />
|
||||||
</SessionState></s:String>
|
</SessionState></s:String>
|
||||||
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=a6a74f48_002D8456_002D43c7_002Dbbee_002Dd3da33a8a4be/@EntryIndexedValue"><SessionState ContinuousTestingIsOn="False" ContinuousTestingMode="0" FrameworkVersion="{x:Null}" IsLocked="False" Name="Integration_TestExamples" PlatformMonoPreference="{x:Null}" PlatformType="{x:Null}" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=a6a74f48_002D8456_002D43c7_002Dbbee_002Dd3da33a8a4be/@EntryIndexedValue"><SessionState ContinuousTestingMode="0" IsActive="True" Name="Integration_TestExamples" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session">
|
||||||
<TestAncestor>
|
<TestAncestor>
|
||||||
<TestId>xUnit::A1309041-8AAE-42D7-A886-94C9FFC6A28C::.NETCoreApp,Version=v3.1::AspectedRouting.Test.ExamplesTest.Integration_TestExamples</TestId>
|
<TestId>xUnit::A1309041-8AAE-42D7-A886-94C9FFC6A28C::.NETCoreApp,Version=v3.1::AspectedRouting.Test.ExamplesTest.Integration_TestExamples</TestId>
|
||||||
</TestAncestor>
|
</TestAncestor>
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace AspectedRouting.IO.itinero1
|
||||||
|
|
||||||
var header = new List<string>
|
var header = new List<string>
|
||||||
{
|
{
|
||||||
$"-- Itinero 1.0-profile, generated by AspectedRouting on {DateTime.Now:s}",
|
$"-- Itinero 1.0-profile, generated by AspectedRouting. Last source file change is {_profile.LastChange:s}",
|
||||||
$"name = \"{_profile.Name}\"",
|
$"name = \"{_profile.Name}\"",
|
||||||
"normalize = false",
|
"normalize = false",
|
||||||
"vehicle_type = {" + string.Join(", ", _profile.VehicleTyps.Select(s => "\"" + s + "\"")) + "}",
|
"vehicle_type = {" + string.Join(", ", _profile.VehicleTyps.Select(s => "\"" + s + "\"")) + "}",
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace AspectedRouting.IO.itinero2
|
||||||
private readonly Context _context;
|
private readonly Context _context;
|
||||||
private readonly List<AspectTestSuite> _aspectTests;
|
private readonly List<AspectTestSuite> _aspectTests;
|
||||||
private readonly IEnumerable<BehaviourTestSuite> _behaviourTestSuite;
|
private readonly IEnumerable<BehaviourTestSuite> _behaviourTestSuite;
|
||||||
|
private readonly DateTime _lastChangeTime;
|
||||||
|
|
||||||
private readonly LuaSkeleton.LuaSkeleton _skeleton;
|
private readonly LuaSkeleton.LuaSkeleton _skeleton;
|
||||||
private readonly LuaParameterPrinter _parameterPrinter;
|
private readonly LuaParameterPrinter _parameterPrinter;
|
||||||
|
@ -39,7 +40,8 @@ namespace AspectedRouting.IO.itinero2
|
||||||
|
|
||||||
public LuaPrinter2(ProfileMetaData profile, string behaviourName,
|
public LuaPrinter2(ProfileMetaData profile, string behaviourName,
|
||||||
Context context,
|
Context context,
|
||||||
List<AspectTestSuite> aspectTests, IEnumerable<BehaviourTestSuite> behaviourTestSuite)
|
List<AspectTestSuite> aspectTests, IEnumerable<BehaviourTestSuite> behaviourTestSuite,
|
||||||
|
DateTime lastChangeTime)
|
||||||
{
|
{
|
||||||
_skeleton = new LuaSkeleton.LuaSkeleton(context);
|
_skeleton = new LuaSkeleton.LuaSkeleton(context);
|
||||||
_profile = profile;
|
_profile = profile;
|
||||||
|
@ -47,6 +49,7 @@ namespace AspectedRouting.IO.itinero2
|
||||||
_context = context;
|
_context = context;
|
||||||
_aspectTests = aspectTests;
|
_aspectTests = aspectTests;
|
||||||
_behaviourTestSuite = behaviourTestSuite;
|
_behaviourTestSuite = behaviourTestSuite;
|
||||||
|
_lastChangeTime = lastChangeTime;
|
||||||
_parameterPrinter = new LuaParameterPrinter(_profile, _skeleton);
|
_parameterPrinter = new LuaParameterPrinter(_profile, _skeleton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +59,7 @@ namespace AspectedRouting.IO.itinero2
|
||||||
new List<string>
|
new List<string>
|
||||||
{
|
{
|
||||||
$"name = \"{_profile.Name}.{_behaviourName}\"",
|
$"name = \"{_profile.Name}.{_behaviourName}\"",
|
||||||
$"generationDate = \"{DateTime.Now:s}\"",
|
$"generationDate = \"{_lastChangeTime:s}\"",
|
||||||
$"description = \"{_profile.Description}\""
|
$"description = \"{_profile.Description}\""
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace AspectedRouting.IO.jsonParser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ProfileMetaData ProfileFromJson(Context c, string json, FileInfo f)
|
public static ProfileMetaData ProfileFromJson(Context c, string json, FileInfo f, DateTime lastChange)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@ namespace AspectedRouting.IO.jsonParser
|
||||||
// this is an aspect
|
// this is an aspect
|
||||||
}
|
}
|
||||||
|
|
||||||
return ParseProfile(doc.RootElement, c, f);
|
return ParseProfile(doc.RootElement, c, f, lastChange);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ namespace AspectedRouting.IO.jsonParser
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static ProfileMetaData ParseProfile(this JsonElement e, Context context, FileInfo filepath)
|
private static ProfileMetaData ParseProfile(this JsonElement e, Context context, FileInfo filepath, DateTime lastChange)
|
||||||
{
|
{
|
||||||
if (!e.TryGetProperty("speed", out _))
|
if (!e.TryGetProperty("speed", out _))
|
||||||
{
|
{
|
||||||
|
@ -141,6 +141,11 @@ namespace AspectedRouting.IO.jsonParser
|
||||||
profiles[profile.Name] = ParseParameters(profile.Value);
|
profiles[profile.Name] = ParseParameters(profile.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lastChange < filepath.LastWriteTimeUtc)
|
||||||
|
{
|
||||||
|
lastChange = filepath.LastWriteTimeUtc;
|
||||||
|
}
|
||||||
|
|
||||||
return new ProfileMetaData(
|
return new ProfileMetaData(
|
||||||
name,
|
name,
|
||||||
e.Get("description"),
|
e.Get("description"),
|
||||||
|
@ -153,7 +158,8 @@ namespace AspectedRouting.IO.jsonParser
|
||||||
oneway,
|
oneway,
|
||||||
speed,
|
speed,
|
||||||
weights,
|
weights,
|
||||||
metadata
|
metadata,
|
||||||
|
lastChange
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,12 +29,16 @@ namespace AspectedRouting.Language.Expression
|
||||||
public IExpression Oneway { get; }
|
public IExpression Oneway { get; }
|
||||||
public IExpression Speed { get; }
|
public IExpression Speed { get; }
|
||||||
public Dictionary<string, IExpression> Priority { get; }
|
public Dictionary<string, IExpression> Priority { get; }
|
||||||
|
/**
|
||||||
|
* Moment of last change of any upstream file
|
||||||
|
*/
|
||||||
|
public DateTime LastChange { get; }
|
||||||
|
|
||||||
public ProfileMetaData(string name, string description, string author, string filename,
|
public ProfileMetaData(string name, string description, string author, string filename,
|
||||||
List<string> vehicleTyps, Dictionary<string, IExpression> defaultParameters,
|
List<string> vehicleTyps, Dictionary<string, IExpression> defaultParameters,
|
||||||
Dictionary<string, Dictionary<string, IExpression>> behaviours,
|
Dictionary<string, Dictionary<string, IExpression>> behaviours,
|
||||||
IExpression access, IExpression oneway, IExpression speed,
|
IExpression access, IExpression oneway, IExpression speed,
|
||||||
Dictionary<string, IExpression> priority, List<string> metadata)
|
Dictionary<string, IExpression> priority, List<string> metadata, DateTime lastChange)
|
||||||
{
|
{
|
||||||
Name = name;
|
Name = name;
|
||||||
Description = description;
|
Description = description;
|
||||||
|
@ -46,6 +50,7 @@ namespace AspectedRouting.Language.Expression
|
||||||
Speed = speed.Optimize();
|
Speed = speed.Optimize();
|
||||||
Priority = priority;
|
Priority = priority;
|
||||||
Metadata = metadata;
|
Metadata = metadata;
|
||||||
|
LastChange = lastChange;
|
||||||
DefaultParameters = defaultParameters;
|
DefaultParameters = defaultParameters;
|
||||||
Behaviours = behaviours;
|
Behaviours = behaviours;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,7 @@ namespace AspectedRouting
|
||||||
var testPath = testFileNames.FindTest(testName);
|
var testPath = testFileNames.FindTest(testName);
|
||||||
AspectTestSuite tests = null;
|
AspectTestSuite tests = null;
|
||||||
if (!string.IsNullOrEmpty(testPath) && File.Exists(testPath))
|
if (!string.IsNullOrEmpty(testPath) && File.Exists(testPath))
|
||||||
{
|
|
||||||
tests = AspectTestSuite.FromString(aspect, File.ReadAllText(testPath));
|
tests = AspectTestSuite.FromString(aspect, File.ReadAllText(testPath));
|
||||||
}
|
|
||||||
|
|
||||||
aspects.Add((aspect, tests));
|
aspects.Add((aspect, tests));
|
||||||
}
|
}
|
||||||
|
@ -44,33 +42,25 @@ namespace AspectedRouting
|
||||||
{
|
{
|
||||||
var testPaths = testFileNames.Where(nm => nm.EndsWith(testName)).ToList();
|
var testPaths = testFileNames.Where(nm => nm.EndsWith(testName)).ToList();
|
||||||
if (testPaths.Count > 1)
|
if (testPaths.Count > 1)
|
||||||
{
|
|
||||||
Console.WriteLine("[WARNING] Multiple tests found for " + testName + ", using only one arbitrarily");
|
Console.WriteLine("[WARNING] Multiple tests found for " + testName + ", using only one arbitrarily");
|
||||||
}
|
|
||||||
|
|
||||||
if (testPaths.Count > 0)
|
if (testPaths.Count > 0) return testPaths.First();
|
||||||
{
|
|
||||||
return testPaths.First();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static List<(ProfileMetaData profile, List<BehaviourTestSuite> profileTests)> ParseProfiles(
|
private static List<(ProfileMetaData profile, List<BehaviourTestSuite> profileTests)> ParseProfiles(
|
||||||
IEnumerable<string> jsonFiles, IReadOnlyCollection<string> testFiles, Context context)
|
IEnumerable<string> jsonFiles, IReadOnlyCollection<string> testFiles, Context context, DateTime lastChange)
|
||||||
{
|
{
|
||||||
var result = new List<(ProfileMetaData profile, List<BehaviourTestSuite> profileTests)>();
|
var result = new List<(ProfileMetaData profile, List<BehaviourTestSuite> profileTests)>();
|
||||||
foreach (var jsonFile in jsonFiles)
|
foreach (var jsonFile in jsonFiles)
|
||||||
{
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var profile =
|
var profile =
|
||||||
JsonParser.ProfileFromJson(context, File.ReadAllText(jsonFile), new FileInfo(jsonFile));
|
JsonParser.ProfileFromJson(context, File.ReadAllText(jsonFile), new FileInfo(jsonFile),
|
||||||
if (profile == null)
|
lastChange);
|
||||||
{
|
if (profile == null) continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
profile.SanityCheckProfile(context);
|
profile.SanityCheckProfile(context);
|
||||||
|
|
||||||
|
@ -97,7 +87,6 @@ namespace AspectedRouting
|
||||||
// PrintError(jsonFile, e);
|
// PrintError(jsonFile, e);
|
||||||
throw new Exception("In the file " + jsonFile, e);
|
throw new Exception("In the file " + jsonFile, e);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -110,10 +99,7 @@ namespace AspectedRouting
|
||||||
{
|
{
|
||||||
Console.Write(profile.Name + "." + behaviour + " > ");
|
Console.Write(profile.Name + "." + behaviour + " > ");
|
||||||
var read = Console.ReadLine();
|
var read = Console.ReadLine();
|
||||||
if (read == null)
|
if (read == null) return; // End of stream has been reached
|
||||||
{
|
|
||||||
return; // End of stream has been reached
|
|
||||||
}
|
|
||||||
|
|
||||||
if (read == "")
|
if (read == "")
|
||||||
{
|
{
|
||||||
|
@ -121,17 +107,11 @@ namespace AspectedRouting
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (read.Equals("quit"))
|
if (read.Equals("quit")) return;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (read.Equals("clear"))
|
if (read.Equals("clear"))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 80; i++)
|
for (var i = 0; i < 80; i++) Console.WriteLine();
|
||||||
{
|
|
||||||
Console.WriteLine();
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -171,10 +151,7 @@ namespace AspectedRouting
|
||||||
var tags = new Dictionary<string, string>();
|
var tags = new Dictionary<string, string>();
|
||||||
foreach (var str in tagsRaw)
|
foreach (var str in tagsRaw)
|
||||||
{
|
{
|
||||||
if (str == "")
|
if (str == "") continue;
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var strSplit = str.Split("=");
|
var strSplit = str.Split("=");
|
||||||
var k = strSplit[0].Trim();
|
var k = strSplit[0].Trim();
|
||||||
|
@ -213,10 +190,7 @@ namespace AspectedRouting
|
||||||
foreach (var (key, values) in profile.AllExpressions(context).PossibleTags())
|
foreach (var (key, values) in profile.AllExpressions(context).PossibleTags())
|
||||||
{
|
{
|
||||||
var vs = "*";
|
var vs = "*";
|
||||||
if (values.Any())
|
if (values.Any()) vs = string.Join(", ", values);
|
||||||
{
|
|
||||||
vs = string.Join(", ", values);
|
|
||||||
}
|
|
||||||
|
|
||||||
Console.WriteLine(key + ": " + vs);
|
Console.WriteLine(key + ": " + vs);
|
||||||
}
|
}
|
||||||
|
@ -224,27 +198,21 @@ namespace AspectedRouting
|
||||||
Console.WriteLine("\n\n\n------------------------");
|
Console.WriteLine("\n\n\n------------------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Main(string[] args)
|
private static void Main(string[] args)
|
||||||
{
|
{
|
||||||
var errMessage = MainWithError(args);
|
var errMessage = MainWithError(args);
|
||||||
if (errMessage != null)
|
if (errMessage != null) Console.WriteLine(errMessage);
|
||||||
{
|
|
||||||
Console.WriteLine(errMessage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public static string MainWithError(string[] args){
|
|
||||||
if (args.Length < 2)
|
public static string MainWithError(string[] args)
|
||||||
{
|
{
|
||||||
|
if (args.Length < 2)
|
||||||
return "Usage: <directory where all aspects and profiles can be found> <outputdirectory>";
|
return "Usage: <directory where all aspects and profiles can be found> <outputdirectory>";
|
||||||
}
|
|
||||||
|
|
||||||
var inputDir = args[0];
|
var inputDir = args[0];
|
||||||
var outputDir = args[1];
|
var outputDir = args[1];
|
||||||
|
|
||||||
if (!Directory.Exists(outputDir))
|
if (!Directory.Exists(outputDir)) Directory.CreateDirectory(outputDir);
|
||||||
{
|
|
||||||
Directory.CreateDirectory(outputDir);
|
|
||||||
}
|
|
||||||
|
|
||||||
MdPrinter.GenerateHelpText(outputDir + "helpText.md");
|
MdPrinter.GenerateHelpText(outputDir + "helpText.md");
|
||||||
|
|
||||||
|
@ -257,10 +225,7 @@ namespace AspectedRouting
|
||||||
|
|
||||||
foreach (var test in tests)
|
foreach (var test in tests)
|
||||||
{
|
{
|
||||||
if (test.EndsWith(".test.csv") || test.EndsWith(".behaviour_test.csv"))
|
if (test.EndsWith(".test.csv") || test.EndsWith(".behaviour_test.csv")) continue;
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new ArgumentException(
|
throw new ArgumentException(
|
||||||
$"Invalid name for csv file ${test}, should end with either '.behaviour_test.csv' or '.test.csv'");
|
$"Invalid name for csv file ${test}, should end with either '.behaviour_test.csv' or '.test.csv'");
|
||||||
|
@ -270,41 +235,35 @@ namespace AspectedRouting
|
||||||
|
|
||||||
var aspects = ParseAspects(files, tests, context);
|
var aspects = ParseAspects(files, tests, context);
|
||||||
|
|
||||||
foreach (var (aspect, _) in aspects)
|
foreach (var (aspect, _) in aspects) context.AddFunction(aspect.Name, aspect);
|
||||||
|
|
||||||
|
var lastChange = DateTime.UnixEpoch;
|
||||||
|
foreach (var file in files)
|
||||||
{
|
{
|
||||||
context.AddFunction(aspect.Name, aspect);
|
var time = new FileInfo(file).LastWriteTimeUtc;
|
||||||
|
if (lastChange < time)
|
||||||
|
{
|
||||||
|
lastChange = time;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var profiles = ParseProfiles(files, tests, context);
|
var profiles = ParseProfiles(files, tests, context, lastChange);
|
||||||
|
|
||||||
|
|
||||||
// With everything parsed and typechecked, time for tests
|
// With everything parsed and typechecked, time for tests
|
||||||
var testsOk = true;
|
var testsOk = true;
|
||||||
foreach (var (aspect, t) in aspects)
|
foreach (var (aspect, t) in aspects)
|
||||||
{
|
|
||||||
if (t == null)
|
if (t == null)
|
||||||
{
|
|
||||||
Console.WriteLine($"[{aspect.Name}] WARNING: no tests found: please add {aspect.Name}.test.csv");
|
Console.WriteLine($"[{aspect.Name}] WARNING: no tests found: please add {aspect.Name}.test.csv");
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
testsOk &= t.Run();
|
testsOk &= t.Run();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var (profile, profileTests) in profiles)
|
foreach (var (profile, profileTests) in profiles)
|
||||||
{
|
foreach (var test in profileTests)
|
||||||
foreach (var test in profileTests)
|
testsOk &= test.Run(context);
|
||||||
{
|
|
||||||
testsOk &= test.Run(context);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!testsOk)
|
if (!testsOk) return "Some tests failed, quitting now without generating output";
|
||||||
{
|
|
||||||
return "Some tests failed, quitting now without generating output";
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var (profile, profileTests) in profiles)
|
foreach (var (profile, profileTests) in profiles)
|
||||||
{
|
{
|
||||||
|
@ -324,14 +283,13 @@ namespace AspectedRouting
|
||||||
behaviourName,
|
behaviourName,
|
||||||
context,
|
context,
|
||||||
aspectTests,
|
aspectTests,
|
||||||
profileTests.Where(testsSuite => testsSuite.BehaviourName == behaviourName)
|
profileTests.Where(testsSuite => testsSuite.BehaviourName == behaviourName),
|
||||||
|
lastChange
|
||||||
).ToLua();
|
).ToLua();
|
||||||
if(!Directory.Exists($"{outputDir}/itinero2/"))
|
if (!Directory.Exists($"{outputDir}/itinero2/"))
|
||||||
{
|
|
||||||
Directory.CreateDirectory($"{outputDir}/itinero2/");
|
Directory.CreateDirectory($"{outputDir}/itinero2/");
|
||||||
}
|
|
||||||
File.WriteAllText(
|
File.WriteAllText(
|
||||||
$"{outputDir}/itinero2/{profile.Name}.{behaviourName}.lua",
|
$"{outputDir}/itinero2/{profile.Name}.{behaviourName}.lua",
|
||||||
lua2behaviour);
|
lua2behaviour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -341,15 +299,11 @@ namespace AspectedRouting
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!args.Contains("--no-repl"))
|
if (!args.Contains("--no-repl"))
|
||||||
{
|
|
||||||
Repl(context, profiles
|
Repl(context, profiles
|
||||||
.Select(p => p.profile)
|
.Select(p => p.profile)
|
||||||
.ToDictionary(p => p.Name, p => p));
|
.ToDictionary(p => p.Name, p => p));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
Console.WriteLine("Not starting REPL as --no-repl is specified");
|
Console.WriteLine("Not starting REPL as --no-repl is specified");
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue