This commit is contained in:
stam 2021-01-14 01:49:35 +03:00
parent fa7353c24c
commit e981a8db67
24 changed files with 0 additions and 245 deletions

View File

@ -1,8 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -1,95 +0,0 @@
using System;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text.Json;
var outputDir = "output";
var feedUrls =
new[] {
"https://my.atlassian.com/download/feeds/archived/bamboo.json",
"https://my.atlassian.com/download/feeds/archived/confluence.json",
"https://my.atlassian.com/download/feeds/archived/crowd.json",
"https://my.atlassian.com/download/feeds/archived/crucible.json",
"https://my.atlassian.com/download/feeds/archived/fisheye.json",
"https://my.atlassian.com/download/feeds/archived/jira-core.json",
"https://my.atlassian.com/download/feeds/archived/jira-servicedesk.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/stash.json",
"https://my.atlassian.com/download/feeds/current/bamboo.json",
"https://my.atlassian.com/download/feeds/current/confluence.json",
"https://my.atlassian.com/download/feeds/current/crowd.json",
"https://my.atlassian.com/download/feeds/current/crucible.json",
"https://my.atlassian.com/download/feeds/current/fisheye.json",
"https://my.atlassian.com/download/feeds/current/jira-core.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/stash.json"
};
var client = new HttpClient();
foreach (var feedUrl in feedUrls)
{
var feedDir = Path.Combine(outputDir, feedUrl[(feedUrl.LastIndexOf('/') + 1)..(feedUrl.LastIndexOf('.'))]);
var atlassianJson = await client.GetStringAsync(feedUrl);
var callString = "downloads(";
var json = atlassianJson[callString.Length..^1];
var parsed = JsonSerializer.Deserialize<ResponseArray[]>(json, new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
});
var versions = parsed.GroupBy(a => a.Version).ToDictionary(a => a.Key, a => a.ToArray());
foreach (var version in versions)
{
var directory = Path.Combine(feedDir, version.Key);
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory);
}
foreach (var file in version.Value)
{
var serverPath = file.ZipUrl.PathAndQuery;
var outputFile = Path.Combine(directory, serverPath[(serverPath.LastIndexOf("/") + 1)..]);
if (!File.Exists(outputFile))
{
if (!string.IsNullOrEmpty(file.Md5))
{
File.WriteAllText(outputFile + ".md5", file.Md5);
}
using var outputStream = File.OpenWrite(outputFile);
using var request = await client.GetStreamAsync(file.ZipUrl).ConfigureAwait(false);
await request.CopyToAsync(outputStream).ConfigureAwait(false);
Console.WriteLine($"Downloaded {outputFile}");
}
else
{
Console.WriteLine($"File for {file.ZipUrl} already exists");
}
}
}
Console.WriteLine($"Downloaded all files from " +
$"{feedUrl}");
}
Console.WriteLine("Download complete");
public partial class ResponseArray
{
public string Description { get; set; }
public string Edition { get; set; }
public Uri ZipUrl { get; set; }
public object TarUrl { get; set; }
public string Md5 { get; set; }
public string Size { get; set; }
public string Released { get; set; }
public string Type { get; set; }
public string Platform { get; set; }
public string Version { get; set; }
public Uri ReleaseNotes { get; set; }
public Uri UpgradeNotes { get; set; }
}

View File

@ -1,9 +0,0 @@
# Product downloader
## How to
1. Download folder to host
2. Install `dotnet5`
3. `dotnet run`
### Author
* [@kasthack](https://github.com/kasthack)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
downloads([{"description":"7.2.1 - Windows Installer, 32-bit","edition":"","zipUrl":"https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-7.2.1-windows-x32.exe","tarUrl":null,"md5":"","size":"","released":"24-Nov-2020","type":"Binary","platform":"Windows","version":"7.2.1","releaseNotes":"https://confluence.atlassian.com/display/BAMBOO/Bamboo+7.2+Release+Notes","upgradeNotes":"https://confluence.atlassian.com/display/BAMBOO/Bamboo+Upgrade+Guide"},{"description":"7.2.1 - Windows Installer, 64-bit","edition":"","zipUrl":"https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-7.2.1-windows-x64.exe","tarUrl":null,"md5":"","size":"","released":"24-Nov-2020","type":"Binary","platform":"Windows","version":"7.2.1","releaseNotes":"https://confluence.atlassian.com/display/BAMBOO/Bamboo+7.2+Release+Notes","upgradeNotes":"https://confluence.atlassian.com/display/BAMBOO/Bamboo+Upgrade+Guide"},{"description":"7.2.1 - ZIP Archive","edition":"","zipUrl":"https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-7.2.1.zip","tarUrl":null,"md5":"","size":"","released":"24-Nov-2020","type":"Binary","platform":"Windows","version":"7.2.1","releaseNotes":"https://confluence.atlassian.com/display/BAMBOO/Bamboo+7.2+Release+Notes","upgradeNotes":"https://confluence.atlassian.com/display/BAMBOO/Bamboo+Upgrade+Guide"},{"description":"7.2.1 - TAR.GZ Archive","edition":"","zipUrl":"https://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-7.2.1.tar.gz","tarUrl":null,"md5":"","size":"","released":"24-Nov-2020","type":"Binary","platform":"Unix, Mac OS X","version":"7.2.1","releaseNotes":"https://confluence.atlassian.com/display/BAMBOO/Bamboo+7.2+Release+Notes","upgradeNotes":"https://confluence.atlassian.com/display/BAMBOO/Bamboo+Upgrade+Guide"}])

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
downloads([{"description":"4.2.2 - Standalone (ZIP Archive)","edition":"None","zipUrl":"https://www.atlassian.com/software/crowd/downloads/binary/atlassian-crowd-4.2.2.zip","tarUrl":null,"md5":"","size":"225.0 MB","released":"18-Nov-2020","type":"Binary","platform":"Windows","version":"4.2.2","releaseNotes":"https://confluence.atlassian.com/display/crowd/crowd+4.2+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/crowd/crowd+4.2+upgrade+notes"},{"description":"4.2.2 - Standalone (TAR.GZ Archive)","edition":"None","zipUrl":"https://www.atlassian.com/software/crowd/downloads/binary/atlassian-crowd-4.2.2.tar.gz","tarUrl":null,"md5":"","size":"223.8 MB","released":"18-Nov-2020","type":"Binary","platform":"Unix, Mac OS X","version":"4.2.2","releaseNotes":"https://confluence.atlassian.com/display/crowd/crowd+4.2+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/crowd/crowd+4.2+upgrade+notes"}])

View File

@ -1 +0,0 @@
downloads([{"description":"Crucible 4.8.5 64 bit Windows Installer","edition":"Standard","zipUrl":"https://www.atlassian.com/software/crucible/downloads/binary/atlassian-crucible-4.8.5-x64.exe","tarUrl":null,"md5":"9b9c11a4595ac1ac0c7bcf471816128d","size":"225.5 MB","released":"14-Dec-2020","type":"Binary","platform":"Windows","version":"4.8.5","releaseNotes":"https://confluence.atlassian.com/display/CRUCIBLE/Crucible+4.8+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/CRUCIBLE/Crucible+upgrade+guide"},{"description":"Crucible 4.8.5","edition":"Standard","zipUrl":"https://www.atlassian.com/software/crucible/downloads/binary/crucible-4.8.5.zip","tarUrl":null,"md5":"46e75b16cfb0dc3c1bb0b72098c6d92a","size":"226.8 MB","released":"14-Dec-2020","type":"Binary","platform":"Windows, Unix, Mac OS X","version":"4.8.5","releaseNotes":"https://confluence.atlassian.com/display/CRUCIBLE/Crucible+4.8+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/CRUCIBLE/Crucible+upgrade+guide"}])

View File

@ -1 +0,0 @@
downloads([{"description":"FishEye 4.8.5 64 bit Windows Installer","edition":"Standard","zipUrl":"https://www.atlassian.com/software/fisheye/downloads/binary/atlassian-fisheye-4.8.5-x64.exe","tarUrl":null,"md5":"187982b3e5751f8bafabe3ac143d3aa0","size":"225.5 MB","released":"14-Dec-2020","type":"Binary","platform":"Windows","version":"4.8.5","releaseNotes":"https://confluence.atlassian.com/display/FISHEYE/Fisheye+4.8+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/FISHEYE/Fisheye+upgrade+guide"},{"description":"FishEye 4.8.5","edition":"Standard","zipUrl":"https://www.atlassian.com/software/fisheye/downloads/binary/fisheye-4.8.5.zip","tarUrl":null,"md5":"9a7add405b48783b848d046da0fd267d","size":"226.8 MB","released":"14-Dec-2020","type":"Binary","platform":"Windows, Unix, Mac OS X","version":"4.8.5","releaseNotes":"https://confluence.atlassian.com/display/FISHEYE/Fisheye+4.8+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/FISHEYE/Fisheye+upgrade+guide"}])

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
downloads([{"description":"4.14.0 (Windows 64 Bit Installer)","edition":"Standard","zipUrl":"https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.14.0-x64.exe","tarUrl":null,"md5":"ede950bc3f44b33e092e7c9958da8669","size":"425.3 MB","released":"22-Nov-2020","type":"Binary","platform":"Windows","version":"4.14.0","releaseNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Management+4.14.x+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Management+4.14.x+upgrade+notes"},{"description":"4.13.1 (Windows 64 Bit Installer)","edition":"Enterprise","zipUrl":"https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.13.1-x64.exe","tarUrl":null,"md5":"1f6bcbbfdafcc210b397d2e479248893","size":"407.4 MB","released":"01-Nov-2020","type":"Binary","platform":"Windows","version":"4.13.1","releaseNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Desk+4.13.x+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Desk+4.13.x+upgrade+notes"},{"description":"4.14.0 (Linux 64 Bit Installer)","edition":"Standard","zipUrl":"https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.14.0-x64.bin","tarUrl":null,"md5":"85195024a619a019c2c98e63d723f397","size":"424.9 MB","released":"22-Nov-2020","type":"Binary","platform":"Unix","version":"4.14.0","releaseNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Management+4.14.x+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Management+4.14.x+upgrade+notes"},{"description":"4.13.1 (Linux 64 Bit Installer)","edition":"Enterprise","zipUrl":"https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.13.1-x64.bin","tarUrl":null,"md5":"856b2c859311f1a7fb224ee6bb7dedff","size":"407.0 MB","released":"01-Nov-2020","type":"Binary","platform":"Unix","version":"4.13.1","releaseNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Desk+4.13.x+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Desk+4.13.x+upgrade+notes"},{"description":"4.14.0 (ZIP Archive)","edition":"Standard","zipUrl":"https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.14.0.zip","tarUrl":null,"md5":"0103ab796ddcb26e7a2180b179e6cf19","size":"384.1 MB","released":"22-Nov-2020","type":"Binary","platform":"Windows","version":"4.14.0","releaseNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Management+4.14.x+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Management+4.14.x+upgrade+notes"},{"description":"4.13.1 (ZIP Archive)","edition":"Enterprise","zipUrl":"https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.13.1.zip","tarUrl":null,"md5":"72fcbb35154a5e3cfa6556f7048424e9","size":"366.2 MB","released":"01-Nov-2020","type":"Binary","platform":"Windows","version":"4.13.1","releaseNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Desk+4.13.x+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Desk+4.13.x+upgrade+notes"},{"description":"4.14.0 (TAR.GZ Archive)","edition":"Standard","zipUrl":"https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.14.0.tar.gz","tarUrl":null,"md5":"8d0727e7acddbb20ce2c06054f070833","size":"373.4 MB","released":"22-Nov-2020","type":"Binary","platform":"Unix, Mac OS X","version":"4.14.0","releaseNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Management+4.14.x+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Management+4.14.x+upgrade+notes"},{"description":"4.13.1 (TAR.GZ Archive)","edition":"Enterprise","zipUrl":"https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.13.1.tar.gz","tarUrl":null,"md5":"88e13b3c574da1007f5c516ae809a851","size":"355.6 MB","released":"01-Nov-2020","type":"Binary","platform":"Unix, Mac OS X","version":"4.13.1","releaseNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Desk+4.13.x+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/SERVICEDESK/JIRA+Service+Desk+4.13.x+upgrade+notes"}])

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
downloads([{"description":"7.9.0 (Windows 64bit Installer)","edition":"None","zipUrl":"https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-7.9.0-x64.exe","tarUrl":null,"md5":"","size":"371.9 MB","released":"04-Jan-2021","type":"Binary","platform":"Windows","version":"7.9.0","releaseNotes":"https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+and+Data+Center+7.9+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+upgrade+guide"},{"description":"7.9.0 (Linux 64bit Installer)","edition":"None","zipUrl":"https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-7.9.0-x64.bin","tarUrl":null,"md5":"","size":"369.8 MB","released":"04-Jan-2021","type":"Binary","platform":"Unix","version":"7.9.0","releaseNotes":"https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+and+Data+Center+7.9+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+upgrade+guide"},{"description":"7.9.0 (TAR.GZ Archive)","edition":"None","zipUrl":"https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-7.9.0.tar.gz","tarUrl":null,"md5":"","size":"316.0 MB","released":"04-Jan-2021","type":"Binary","platform":"Windows, Unix, Mac OS X","version":"7.9.0","releaseNotes":"https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+and+Data+Center+7.9+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+upgrade+guide"},{"description":"7.9.0 (ZIP Archive)","edition":"None","zipUrl":"https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-7.9.0.zip","tarUrl":null,"md5":"","size":"319.0 MB","released":"04-Jan-2021","type":"Binary","platform":"Windows, Unix, Mac OS X","version":"7.9.0","releaseNotes":"https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+and+Data+Center+7.9+release+notes","upgradeNotes":"https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+upgrade+guide"}])

View File

@ -1,53 +0,0 @@
# Current links
## Bamboo
* https://my.atlassian.com/download/feeds/current/bamboo.json
## Bitbucket (Stash)
* https://my.atlassian.com/download/feeds/current/stash.json
## Confluence
* https://my.atlassian.com/download/feeds/current/confluence.json
## Crowd
* https://my.atlassian.com/download/feeds/current/crowd.json
## Crucible
* https://my.atlassian.com/download/feeds/current/crucible.json
## FishEye
* https://my.atlassian.com/download/feeds/current/fisheye.json
## Jira
* https://my.atlassian.com/download/feeds/current/jira-core.json
* https://my.atlassian.com/download/feeds/current/jira-software.json
* https://my.atlassian.com/download/feeds/current/jira-servicedesk.json
--------------------
# Archived links
## Bamboo
* https://my.atlassian.com/download/feeds/archived/bamboo.json
## Bitbucket (Stash)
* https://my.atlassian.com/download/feeds/archived/stash.json
## Confluence
* https://my.atlassian.com/download/feeds/archived/confluence.json
## Crowd
* https://my.atlassian.com/download/feeds/archived/crowd.json
## Crucible
* https://my.atlassian.com/download/feeds/archived/crucible.json
## FishEye
* https://my.atlassian.com/download/feeds/archived/fisheye.json
## Jira
* https://my.atlassian.com/download/feeds/archived/jira.json
* https://my.atlassian.com/download/feeds/archived/jira-core.json
* https://my.atlassian.com/download/feeds/archived/jira-software.json
* https://my.atlassian.com/download/feeds/archived/jira-servicedesk.json

View File

@ -1,61 +0,0 @@
#!/bin/bash
rm -rfv $PWD/current $PWD/archived
mkdir -p $PWD/current $PWD/archived
###################################################################################################
# Current links
###################################################################################################
# Bamboo
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/bamboo.json
# Bitbucket (Stash)
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/stash.json
# Confluence
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/confluence.json
# Crowd
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/crowd.json
# Crucible
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/crucible.json
# FishEye
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/fisheye.json
# Jira
#wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/jira.json
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/jira-core.json
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/jira-software.json
wget -c --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/jira-servicedesk.json
###################################################################################################
# Archived links
###################################################################################################
# Bamboo
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/bamboo.json
# Bitbucket (Stash)
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/stash.json
# Confluence
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/confluence.json
# Crowd
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/crowd.json
# Crucible
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/crucible.json
# FishEye
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/fisheye.json
# Jira
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/jira.json
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/jira-core.json
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/jira-software.json
wget -c --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/jira-servicedesk.json