Skip to content

Commit

Permalink
show archived file count
Browse files Browse the repository at this point in the history
  • Loading branch information
EdiWang committed May 8, 2023
1 parent 340ebab commit 73c6f42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
13 changes: 3 additions & 10 deletions src/Edi.AzureBlobSync/Edi.AzureBlobSync.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<AssemblyVersion>1.15.3.0</AssemblyVersion>
<FileVersion>1.15.3.0</FileVersion>
<Version>1.15.3.0</Version>
<AssemblyVersion>1.16.0.0</AssemblyVersion>
<FileVersion>1.16.0.0</FileVersion>
<Version>1.16.0.0</Version>
<PackAsTool>true</PackAsTool>
<ToolCommandName>azblobsync</ToolCommandName>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -19,13 +19,6 @@
<PackageTags>Azure</PackageTags>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Spectre.Console" Version="0.46.0" />
Expand Down
5 changes: 4 additions & 1 deletion src/Edi.AzureBlobSync/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace Edi.AzureBlobSync;
class Program
{
private static int _notDownloaded = 0;
private static int _archived = 0;

public static Options Options { get; set; }

Expand Down Expand Up @@ -152,7 +153,7 @@ await AnsiConsole.Status()
}

AnsiConsole.WriteLine("----------------------------------------------------");
AnsiConsole.Write(new Markup($"Local Files Up to Date. [green]{excepts.Count - _notDownloaded}[/] new file(s) downloaded, [yellow]{deleteCount}[/] file(s) deleted."));
AnsiConsole.Write(new Markup($"Local Files Up to Date. [green]{excepts.Count - _notDownloaded}[/] new file(s) downloaded, [yellow]{deleteCount}[/] file(s) deleted, {_archived} file(s) archived not downloaded."));
}
catch (Exception e)
{
Expand Down Expand Up @@ -216,6 +217,8 @@ private static async Task DownloadAll(List<FileSyncInfo> excepts)
else
{
_notDownloaded++;
_archived++;

AnsiConsole.Write(new Markup($"[yellow]Skipped download for archived file '{fileSyncInfo.FileName}', please move it to cool or hot tier.[/]\n"));
}
}
Expand Down

0 comments on commit 73c6f42

Please sign in to comment.