Skip to content

Commit

Permalink
package builder - test name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hlotyaks committed Jan 3, 2020
1 parent 74b29b7 commit 801f0bb
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,6 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Ignore any generated files as part of packag builder tests
PackageBuilder/tests/**/output/*
2 changes: 1 addition & 1 deletion GraphBuilder/src/Exceptions/GraphBuilderExcpetions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;


namespace PackageAnalyzer
namespace PackageAnalyzer.Exceptions
{
public class GraphBuilderException : Exception
{
Expand Down
4 changes: 2 additions & 2 deletions GraphBuilder/src/GraphBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void Insert(FileInfo fileInfo)
}
catch (Exception e)
{
throw new GraphBuilderException("Malformed package description file.", e);
throw new Exceptions.GraphBuilderException("Malformed package description file.", e);
}

// get dependency section
Expand All @@ -62,7 +62,7 @@ public void Insert(FileInfo fileInfo)
}
catch (Exception e)
{
throw new GraphBuilderException("Malformed dependency tag in description file.", e);
throw new Exceptions.GraphBuilderException("Malformed dependency tag in description file.", e);
}
}

Expand Down
20 changes: 20 additions & 0 deletions PackageBuilder/src/Exceptions/PackageBuilder.CycleException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;


namespace PackageAnalyzer.Exceptions
{
public class PackageBuilderCycleException : Exception
{
public PackageBuilderCycleException()
{
}

public PackageBuilderCycleException(string message) : base(message)
{
}

public PackageBuilderCycleException(string message, Exception inner) : base(message, inner)
{
}
}
}
23 changes: 18 additions & 5 deletions PackageBuilder/src/PackageBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,30 @@ namespace PackageAnalyzer
public class PackageBuilder
{
// location relative to specified rootFolder.
const string PACKAGE_DESCRIPTIONS = "packages//descriptions";
const string PACKAGE_CACHE = "packages//cache";
const string PACKAGE_SOURCE = "src";
const string PACKAGE_OUTPUT = "output";
const string PACKAGE_DESCRIPTIONS = "//packages//descriptions";
const string PACKAGE_CACHE = "//packages//cache";
const string PACKAGE_SOURCE = "//src";
const string PACKAGE_OUTPUT = "//output";



public PackageBuilder()
{
}


public List<string> Build(string start, string rootFolder)
public List<string> Build(string startNode, string rootFolder)
{
List<string> builtPackages = new List<string>();

GraphBuilder gb = new GraphBuilder($"{rootFolder}{PACKAGE_DESCRIPTIONS}");

if (gb.Graph.IsCyclic)
{
// need logging. throw cycle exception
throw new Exceptions.PackageBuilderCycleException("Cycle detected in package graph.");
}

return builtPackages;
}
}
Expand Down
10 changes: 9 additions & 1 deletion PackageBuilder/src/PackageBuilder.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\GraphBuilder\src\GraphBuilder.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\PackageHasher\src\PackageHasher.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion PackageHasher/src/PackageHasher.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

</Project>

0 comments on commit 801f0bb

Please sign in to comment.