mirror of
https://github.com/EpicMorg/atlassian-downloader.git
synced 2025-01-30 12:17:54 +03:00
1.0.1.0
new release
This commit is contained in:
commit
c1d586363d
@ -1,6 +1,7 @@
|
|||||||
# Atlassian Downloader - Changelog
|
# Atlassian Downloader - Changelog
|
||||||
|
|
||||||
* `1.0.0.9` - switched to `dontet7.0`, updated deps.
|
* `1.0.1.0` - added support of `Atlassian Bitbucket (Mesh)` product, updated deps, fixed `Chocolatey` support and start logic.
|
||||||
|
* `1.0.0.9` - updated deps.
|
||||||
* `1.0.0.8` - switched to `dontet6.0`, updated deps.
|
* `1.0.0.8` - switched to `dontet6.0`, updated deps.
|
||||||
* `1.0.0.7` - added `unofficial support` of `sourcetree` via automatic mirror [from github](https://github.com/EpicMorg/atlassian-json). fixed `logger` output, code improvments.
|
* `1.0.0.7` - added `unofficial support` of `sourcetree` via automatic mirror [from github](https://github.com/EpicMorg/atlassian-json). fixed `logger` output, code improvments.
|
||||||
* `1.0.0.6` - added support of `clover`. fixed broken json parsing. added new `logger`.
|
* `1.0.0.6` - added support of `clover`. fixed broken json parsing. added new `logger`.
|
||||||
|
@ -111,6 +111,7 @@ The following built-in themes are available, provided by `Serilog.Sinks.Console`
|
|||||||
|-------------|:-------------:|:-------------:|:-------------:|
|
|-------------|:-------------:|:-------------:|:-------------:|
|
||||||
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Bamboo&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/bamboo) | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Bamboo&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/bamboo) | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||||
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Bitbucket%20(Stash)&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/bitbucket) | :white_check_mark: | :white_check_mark: | :interrobang: |
|
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Bitbucket%20(Stash)&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/bitbucket) | :white_check_mark: | :white_check_mark: | :interrobang: |
|
||||||
|
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Bitbucket%20(Mesh)&color=bright%20green&style=for-the-badge)](https://confluence.atlassian.com/bitbucketserver/bitbucket-mesh-compatibility-matrix-1127254859.html) | :white_check_mark: | :white_check_mark: | :interrobang: |
|
||||||
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Clover&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/clover) | :white_check_mark: | :white_check_mark: | :x: |
|
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Clover&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/clover) | :white_check_mark: | :white_check_mark: | :x: |
|
||||||
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Confluence&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/confluence) | :white_check_mark: | :white_check_mark: | :x: |
|
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Confluence&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/confluence) | :white_check_mark: | :white_check_mark: | :x: |
|
||||||
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Crowd&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/crowd) | :white_check_mark: | :white_check_mark: | :x: |
|
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Crowd&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/crowd) | :white_check_mark: | :white_check_mark: | :x: |
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 32 KiB |
@ -103,7 +103,7 @@ namespace EpicMorg.Atlassian.Downloader
|
|||||||
public async Task StartAsync(CancellationToken cancellationToken)
|
public async Task StartAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
SetConsoleTitle();
|
SetConsoleTitle();
|
||||||
if (options.Version)
|
if (options.Version || string.IsNullOrWhiteSpace(options.OutputDir))
|
||||||
{
|
{
|
||||||
ShowVersionInfo();
|
ShowVersionInfo();
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ namespace EpicMorg.Atlassian.Downloader
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var (json, versions) = await this.GetJson(feedUrl, cancellationToken).ConfigureAwait(false);
|
var (json, versions) = await this.GetJson(feedUrl, options.ProductVersion, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
switch (options.Action)
|
switch (options.Action)
|
||||||
{
|
{
|
||||||
@ -182,7 +182,7 @@ namespace EpicMorg.Atlassian.Downloader
|
|||||||
Console.ResetColor();
|
Console.ResetColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<(string json, IDictionary<string, ResponseItem[]> versions)> GetJson(string feedUrl, CancellationToken cancellationToken)
|
private async Task<(string json, IDictionary<string, ResponseItem[]> versions)> GetJson(string feedUrl, string? productVersion = null, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
var atlassianJson = await client.GetStringAsync(feedUrl, cancellationToken).ConfigureAwait(false);
|
var atlassianJson = await client.GetStringAsync(feedUrl, cancellationToken).ConfigureAwait(false);
|
||||||
var json = atlassianJson.Trim()["downloads(".Length..^1];
|
var json = atlassianJson.Trim()["downloads(".Length..^1];
|
||||||
@ -192,7 +192,10 @@ namespace EpicMorg.Atlassian.Downloader
|
|||||||
PropertyNameCaseInsensitive = true
|
PropertyNameCaseInsensitive = true
|
||||||
});
|
});
|
||||||
logger.LogDebug("Found {0} releases", parsed.Length);
|
logger.LogDebug("Found {0} releases", parsed.Length);
|
||||||
var versions = parsed.GroupBy(a => a.Version).ToDictionary(a => a.Key, a => a.ToArray());
|
var versions = parsed
|
||||||
|
.GroupBy(a => a.Version)
|
||||||
|
.Where(a => productVersion is null || a.Key == productVersion)
|
||||||
|
.ToDictionary(a => a.Key, a => a.ToArray());
|
||||||
logger.LogDebug("Found {0} releases", versions.Count);
|
logger.LogDebug("Found {0} releases", versions.Count);
|
||||||
return (json, versions);
|
return (json, versions);
|
||||||
}
|
}
|
||||||
@ -211,6 +214,7 @@ namespace EpicMorg.Atlassian.Downloader
|
|||||||
"https://my.atlassian.com/download/feeds/archived/jira-software.json",
|
"https://my.atlassian.com/download/feeds/archived/jira-software.json",
|
||||||
"https://my.atlassian.com/download/feeds/archived/jira.json",
|
"https://my.atlassian.com/download/feeds/archived/jira.json",
|
||||||
"https://my.atlassian.com/download/feeds/archived/stash.json",
|
"https://my.atlassian.com/download/feeds/archived/stash.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/archived/mesh.json",
|
||||||
|
|
||||||
"https://my.atlassian.com/download/feeds/current/bamboo.json",
|
"https://my.atlassian.com/download/feeds/current/bamboo.json",
|
||||||
"https://my.atlassian.com/download/feeds/current/clover.json",
|
"https://my.atlassian.com/download/feeds/current/clover.json",
|
||||||
@ -222,12 +226,14 @@ namespace EpicMorg.Atlassian.Downloader
|
|||||||
"https://my.atlassian.com/download/feeds/current/jira-servicedesk.json",
|
"https://my.atlassian.com/download/feeds/current/jira-servicedesk.json",
|
||||||
"https://my.atlassian.com/download/feeds/current/jira-software.json",
|
"https://my.atlassian.com/download/feeds/current/jira-software.json",
|
||||||
"https://my.atlassian.com/download/feeds/current/stash.json",
|
"https://my.atlassian.com/download/feeds/current/stash.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/current/mesh.json",
|
||||||
|
|
||||||
"https://my.atlassian.com/download/feeds/eap/bamboo.json",
|
"https://my.atlassian.com/download/feeds/eap/bamboo.json",
|
||||||
"https://my.atlassian.com/download/feeds/eap/confluence.json",
|
"https://my.atlassian.com/download/feeds/eap/confluence.json",
|
||||||
"https://my.atlassian.com/download/feeds/eap/jira.json",
|
"https://my.atlassian.com/download/feeds/eap/jira.json",
|
||||||
"https://my.atlassian.com/download/feeds/eap/jira-servicedesk.json",
|
"https://my.atlassian.com/download/feeds/eap/jira-servicedesk.json",
|
||||||
"https://my.atlassian.com/download/feeds/eap/stash.json",
|
"https://my.atlassian.com/download/feeds/eap/stash.json",
|
||||||
|
"https://my.atlassian.com/download/feeds/eap/mesh.json",
|
||||||
|
|
||||||
//https://raw.githubusercontent.com/EpicMorg/atlassian-json/master/json-backups/archived/sourcetree.json
|
//https://raw.githubusercontent.com/EpicMorg/atlassian-json/master/json-backups/archived/sourcetree.json
|
||||||
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/sourcetree.json",
|
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/sourcetree.json",
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
namespace EpicMorg.Atlassian.Downloader
|
namespace EpicMorg.Atlassian.Downloader
|
||||||
{
|
{
|
||||||
public record DownloaderOptions(string OutputDir, Uri[] CustomFeed, DownloadAction Action,bool Version) { }
|
public record DownloaderOptions(string OutputDir, Uri[] CustomFeed, DownloadAction Action,bool Version, string ProductVersion) { }
|
||||||
}
|
}
|
@ -6,6 +6,8 @@ using Microsoft.Extensions.Logging;
|
|||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace EpicMorg.Atlassian.Downloader
|
namespace EpicMorg.Atlassian.Downloader
|
||||||
@ -19,13 +21,14 @@ namespace EpicMorg.Atlassian.Downloader
|
|||||||
/// <param name="OutputDir">Override output directory to download</param>
|
/// <param name="OutputDir">Override output directory to download</param>
|
||||||
/// <param name="customFeed">Override URIs to import</param>
|
/// <param name="customFeed">Override URIs to import</param>
|
||||||
/// <param name="Version">Show credits banner</param>
|
/// <param name="Version">Show credits banner</param>
|
||||||
static async Task Main(string OutputDir = "atlassian", Uri[] customFeed = null, DownloadAction Action = DownloadAction.Download, bool Version = false) => await
|
/// <param name="productVersion">Override target version to download some product. Advice: Use it with "customFeed".</param>
|
||||||
|
static async Task Main(string OutputDir, Uri[] customFeed = null, DownloadAction Action = DownloadAction.Download, bool Version = false, string productVersion = null) => await
|
||||||
Host
|
Host
|
||||||
.CreateDefaultBuilder()
|
.CreateDefaultBuilder()
|
||||||
.ConfigureHostConfiguration(configHost => configHost.AddEnvironmentVariables())
|
.ConfigureHostConfiguration(configHost => configHost.AddEnvironmentVariables())
|
||||||
.ConfigureAppConfiguration((ctx, configuration) =>
|
.ConfigureAppConfiguration((ctx, configuration) =>
|
||||||
configuration
|
configuration
|
||||||
.SetBasePath(Environment.CurrentDirectory)
|
.SetBasePath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))
|
||||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||||
.AddJsonFile($"appsettings.{ctx.HostingEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true)
|
.AddJsonFile($"appsettings.{ctx.HostingEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true)
|
||||||
.AddEnvironmentVariables())
|
.AddEnvironmentVariables())
|
||||||
@ -41,7 +44,7 @@ namespace EpicMorg.Atlassian.Downloader
|
|||||||
.AddSerilog(dispose: true);
|
.AddSerilog(dispose: true);
|
||||||
})
|
})
|
||||||
.AddHostedService<DonloaderService>()
|
.AddHostedService<DonloaderService>()
|
||||||
.AddSingleton(new DownloaderOptions(OutputDir, customFeed, Action, Version))
|
.AddSingleton(new DownloaderOptions(OutputDir, customFeed, Action, Version, productVersion))
|
||||||
.AddHttpClient())
|
.AddHttpClient())
|
||||||
.RunConsoleAsync()
|
.RunConsoleAsync()
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
<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.9</AssemblyVersion>
|
<AssemblyVersion>1.0.1.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.0.9</FileVersion>
|
<FileVersion>1.0.1.0</FileVersion>
|
||||||
<Version>1.0.0.9</Version>
|
<Version>1.0.1.0</Version>
|
||||||
<Copyright>EpicMorg 2023</Copyright>
|
<Copyright>EpicMorg 2023</Copyright>
|
||||||
<Product>Atlassian Downloader</Product>
|
<Product>Atlassian Downloader</Product>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user