Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop deploy binaries with app #470

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Source/v2/Meadow.Cli/AppManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@ public static class AppManager
{
private static bool MatchingDllExists(string file)
{
var root = Path.GetFileNameWithoutExtension(file);
return File.Exists($"{root}.dll");
return File.Exists(Path.ChangeExtension(file, ".dll"));
}

private static bool IsPdb(string file)
{
return string.Compare(Path.GetExtension(file), ".pdb", true) == 0;
return String.Compare(Path.GetExtension(file), ".pdb", StringComparison.OrdinalIgnoreCase) == 0;
}

private static bool IsXmlDoc(string file)
{
if (string.Compare(Path.GetExtension(file), ".xml", true) == 0)
if (String.Compare(Path.GetExtension(file), ".xml", StringComparison.OrdinalIgnoreCase) == 0)
{
return MatchingDllExists(file);
}
Expand All @@ -44,6 +43,13 @@ public static async Task DeployApplication(
var dependencies = packageManager.GetDependencies(new FileInfo(Path.Combine(localBinaryDirectory, "App.dll")));
dependencies.Add(Path.Combine(localBinaryDirectory, "App.dll"));

var binaries = Directory.EnumerateFiles(localBinaryDirectory, "*.*", SearchOption.TopDirectoryOnly)
.Where(s => new FileInfo(s).Extension != ".dll")
.Where(s => new FileInfo(s).Extension != ".pdb")
.Where(s => !s.Contains(".DS_Store"));
dependencies.AddRange(binaries);


logger?.LogInformation("Generating list of files to deploy...");
foreach (var file in dependencies)
{
Expand Down
Loading