Merge pull request #250 from Cyberboss/CLFixAgain

Fixes parsing of synchronize directories in TGS3.json
This commit is contained in:
Jordan Brown
2017-10-16 12:30:12 -04:00
committed by GitHub
+9 -9
View File
@@ -47,7 +47,7 @@ namespace TGServerService
public readonly string PathToChangelogPy;
public readonly string ChangelogPyArguments;
public readonly IList<string> PipDependancies = new List<string>();
public readonly IList<string> ChangelogPathsToStage = new List<string>();
public readonly IList<string> PathsToStage = new List<string>();
public readonly IList<string> StaticDirectoryPaths = new List<string>();
public readonly IList<string> DLLPaths = new List<string>();
@@ -70,16 +70,16 @@ namespace TGServerService
PipDependancies = LoadArray(details["pip_dependancies"]);
}
catch { }
try
{
ChangelogPathsToStage = LoadArray(details["synchronize_paths"]);
}
catch { }
}
catch {
ChangelogSupport = false;
}
try
{
PathsToStage = LoadArray(json["synchronize_paths"]);
}
catch { }
try
{
StaticDirectoryPaths = LoadArray(json["static_directories"]);
}
@@ -115,7 +115,7 @@ namespace TGServerService
&& PathToChangelogPy == other.PathToChangelogPy
&& ChangelogPyArguments == other.ChangelogPyArguments
&& ListEquals(PipDependancies, other.PipDependancies)
&& ListEquals(ChangelogPathsToStage, other.ChangelogPathsToStage)
&& ListEquals(PathsToStage, other.PathsToStage)
&& ListEquals(StaticDirectoryPaths, other.StaticDirectoryPaths)
&& ListEquals(DLLPaths, other.DLLPaths);
}
@@ -127,7 +127,7 @@ namespace TGServerService
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(PathToChangelogPy);
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(ChangelogPyArguments);
hashCode = hashCode * -1521134295 + EqualityComparer<IList<string>>.Default.GetHashCode(PipDependancies);
hashCode = hashCode * -1521134295 + EqualityComparer<IList<string>>.Default.GetHashCode(ChangelogPathsToStage);
hashCode = hashCode * -1521134295 + EqualityComparer<IList<string>>.Default.GetHashCode(PathsToStage);
hashCode = hashCode * -1521134295 + EqualityComparer<IList<string>>.Default.GetHashCode(StaticDirectoryPaths);
hashCode = hashCode * -1521134295 + EqualityComparer<IList<string>>.Default.GetHashCode(DLLPaths);
return hashCode;
@@ -1012,7 +1012,7 @@ namespace TGServerService
try
{
// Stage the file
foreach(var I in Config.ChangelogPathsToStage)
foreach(var I in Config.PathsToStage)
Commands.Stage(Repo, I);
if (Repo.RetrieveStatus().Staged.Count() == 0) //nothing to commit