Skip to content

Commit

Permalink
fix: push command is exectued even if no packages are about to be pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
iadonkey committed Jul 29, 2024
1 parent 165173f commit 931365d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions TwinpackRegistry/Commands/PullCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ public override async Task<int> ExecuteAsync()
_logger.Info(new string('-', 3) + $" download");
await registry.DownloadAsync(RegistryOwner, RegistryName, token: Token);

if (!DryRun)
var plcs = TwinpackUtils.PlcProjectsFromConfig(compiled: false, target: "TC3.1");
if (!DryRun && plcs.Any())
{
_logger.Info(new string('-', 3) + $" push");
await _twinpackServer.PushAsync(TwinpackUtils.PlcProjectsFromConfig(compiled: false, target: "TC3.1"), "Release", "main", "TC3.1", null, false);
await _twinpackServer.PushAsync(plcs, "Release", "main", "TC3.1", null, false);
}

return 0;
Expand Down

0 comments on commit 931365d

Please sign in to comment.