Skip to content

Commit

Permalink
Copy support file for Meadow.Updater to temp folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
CartBlanche committed Jun 17, 2024
1 parent 94381f8 commit f2dd343
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Source/v2/Meadow.CLI/Commands/Current/UpdateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ namespace Meadow.CLI.Commands.DeviceManagement;
public class UpdateCommand : BaseCommand<UpdateCommand>
{
const string MEADOW_CLI = "WildernessLabs.Meadow.CLI";
const string MEADOW_UPDATER = "Meadow.Updater";

[CommandOption("version", 'v', IsRequired = false)]
const string MEADOW_UPDATER = "Meadow.Updater";
const string CLIFX = "CliFx";

[CommandOption("version", 'v', IsRequired = false)]
public string? Version { get; set; }

public UpdateCommand(
Expand Down Expand Up @@ -56,9 +57,12 @@ protected override async ValueTask ExecuteCommand()
{
Directory.CreateDirectory(tempUpdaterDir);
}
CopyMeadowUpdaterFiles(Path.GetDirectoryName(meadowUpdaterPath), tempUpdaterDir, MEADOW_UPDATER);
CopyMeadowUpdaterFiles(Path.GetDirectoryName(meadowUpdaterPath), tempUpdaterDir, MEADOW_UPDATER);

// Supporting files required in the temp directory
CopyMeadowUpdaterFiles(Path.GetDirectoryName(meadowUpdaterPath), tempUpdaterDir, CLIFX);

string commandArguments = $"update -t {MEADOW_CLI}";
string commandArguments = $"update -t {MEADOW_CLI}";
if (!string.IsNullOrWhiteSpace(Version))
{
commandArguments += $" -v {Version}";
Expand Down

0 comments on commit f2dd343

Please sign in to comment.