mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-24 13:45:32 +03:00
edit generator
This commit is contained in:
parent
8d59cbc056
commit
fd524c76a8
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.CommandLine.DragonFruit" Version="0.3.0-alpha.21216.1" />
|
||||
|
@ -16,13 +16,14 @@
|
||||
/// <param name="json">Atlassian product JSON</param>
|
||||
/// <param name="product">Product name</param>
|
||||
/// <param name="force">Overwrite existing directories</param>
|
||||
/// <param name="archiveType">Overwrite archive type</param>
|
||||
/// <param name="ignoreVersionsWithoutTemplates">Silently ignore versions without templates</param>
|
||||
/// <returns></returns>
|
||||
public static async Task Main(DirectoryInfo workdir, FileInfo json, string product, bool force = false, bool ignoreVersionsWithoutTemplates = false)
|
||||
public static async Task Main(DirectoryInfo workdir, FileInfo json, string product, bool force = false, bool ignoreVersionsWithoutTemplates = false,string archiveType = ".tar.gz")
|
||||
{
|
||||
var jsonData = File.ReadAllText(json.FullName)["downloads(".Length..^1];
|
||||
var items = JsonSerializer.Deserialize<ResponseItem[]>(jsonData, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
foreach (var item in items.Where(a=>a.ZipUrl.ToString().EndsWith(".tar.gz")))
|
||||
foreach (var item in items.Where(a=>a.ZipUrl.ToString().EndsWith(archiveType)))
|
||||
{
|
||||
var majorVersion = item.Version.Split(".").First();
|
||||
var templatePath = Path.Combine(workdir.FullName, product, "templates", majorVersion);
|
||||
|
Loading…
Reference in New Issue
Block a user