mirror of
https://github.com/EpicMorg/atlassian-downloader.git
synced 2025-05-07 03:59:27 +03:00
v1.0.0.3
This commit is contained in:
parent
f333eb5e4c
commit
711398a30a
@ -4,7 +4,7 @@
|
|||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||||
<PackageId>Atlassian Downloader</PackageId>
|
<PackageId>EpicMorg.Atlassian.Downloader</PackageId>
|
||||||
<Authors>Atlassian Downloader</Authors>
|
<Authors>Atlassian Downloader</Authors>
|
||||||
<Description>Atlassian Downloader by EpicMorg, code by kasthack</Description>
|
<Description>Atlassian Downloader by EpicMorg, code by kasthack</Description>
|
||||||
<PackageProjectUrl>https://github.com/EpicMorg/atlassian-downloader</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/EpicMorg/atlassian-downloader</PackageProjectUrl>
|
||||||
@ -13,9 +13,10 @@
|
|||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<RepositoryUrl>https://github.com/EpicMorg/atlassian-downloader</RepositoryUrl>
|
<RepositoryUrl>https://github.com/EpicMorg/atlassian-downloader</RepositoryUrl>
|
||||||
<PackageTags>atlassian, donwloader, epicmorg</PackageTags>
|
<PackageTags>atlassian, donwloader, epicmorg</PackageTags>
|
||||||
<AssemblyVersion>1.0.0.2</AssemblyVersion>
|
<AssemblyVersion>1.0.0.3</AssemblyVersion>
|
||||||
<Version>1.0.0.2</Version>
|
<Version>1.0.0.3</Version>
|
||||||
<Copyright>EpicMorg 20201</Copyright>
|
<Copyright>EpicMorg 20201</Copyright>
|
||||||
|
<Product>Atlassian Downloader</Product>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
|
|
||||||
var appTitle = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
|
var appTitle = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
|
||||||
var appVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
var appVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
var appStartupDate = DateTime.Now;
|
var appStartupDate = DateTime.Now;
|
||||||
|
var appBuildType = "[Release]";
|
||||||
|
#if DEBUG
|
||||||
|
appBuildType = "[Debug]";
|
||||||
|
#endif
|
||||||
|
|
||||||
var outputDir = "output";
|
var outputDir = "output";
|
||||||
var feedUrls =
|
var feedUrls =
|
||||||
new[] {
|
new[] {
|
||||||
@ -34,7 +37,7 @@ var feedUrls =
|
|||||||
"https://my.atlassian.com/download/feeds/current/stash.json"
|
"https://my.atlassian.com/download/feeds/current/stash.json"
|
||||||
};
|
};
|
||||||
|
|
||||||
Console.Title = $"{appTitle} {appVersion}";
|
Console.Title = $"{appTitle} {appVersion} {appBuildType}";
|
||||||
Console.WriteLine($"Download started at {appStartupDate}.");
|
Console.WriteLine($"Download started at {appStartupDate}.");
|
||||||
|
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
@ -71,22 +74,20 @@ foreach (var feedUrl in feedUrls)
|
|||||||
using var request = await client.GetStreamAsync(file.ZipUrl).ConfigureAwait(false);
|
using var request = await client.GetStreamAsync(file.ZipUrl).ConfigureAwait(false);
|
||||||
await request.CopyToAsync(outputStream).ConfigureAwait(false);
|
await request.CopyToAsync(outputStream).ConfigureAwait(false);
|
||||||
Console.ForegroundColor = ConsoleColor.Green;
|
Console.ForegroundColor = ConsoleColor.Green;
|
||||||
Console.WriteLine($"File \"{file.ZipUrl}\" downloaded to \"{outputFile}\".");
|
Console.WriteLine($"[INFO] File \"{file.ZipUrl}\" successfully downloaded to \"{outputFile}\".");
|
||||||
Console.ResetColor();
|
Console.ResetColor();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||||
Console.WriteLine($"[WARN] File \"{outputFile}\" for \"{file.ZipUrl}\" already exists. Skip.");
|
Console.WriteLine($"[WARN] File \"{outputFile}\" already exists. Download from \"{file.ZipUrl}\" skipped.");
|
||||||
Console.ResetColor();
|
Console.ResetColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Console.WriteLine($"Downloaded all files from " +
|
Console.WriteLine($"[SUCCESS] All files from \"{feedUrl}\" successfully downloaded.");
|
||||||
$"{feedUrl}");
|
|
||||||
}
|
}
|
||||||
Console.WriteLine("Download complete.");
|
Console.WriteLine($"Download complete at {appStartupDate}.");
|
||||||
|
|
||||||
|
|
||||||
public partial class ResponseArray
|
public partial class ResponseArray
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user