Compare commits

...

108 Commits

Author SHA1 Message Date
763c75c162
Update CHANGELOG.md 2024-08-05 02:45:18 +03:00
30b159c35c
2.0.0.2 2024-08-05 02:44:28 +03:00
6063467e2d
2.0.0.2 2024-08-05 02:44:04 +03:00
b4e881a1d7
Merge pull request #46 from EpicMorg/develop
sync
2023-10-16 15:28:28 +03:00
332c3e1a7e
Update LICENSE.md 2023-10-16 15:27:23 +03:00
a43b17511b
Merge branch 'master' into develop 2023-10-16 15:24:39 +03:00
b11529d9b9
Copyright 2023-10-16 15:23:00 +03:00
96d29562af
Merge branch 'master' into develop 2023-10-16 15:10:38 +03:00
859c7d3c57
dotnet8 gh (#44)
* dotnet-version: 8
2023-10-16 15:09:42 +03:00
28bc6ffcfb
dotnet-version: 8 2023-10-16 15:08:56 +03:00
22cb98ef63
dotnet-version: 8 2023-10-16 15:06:41 +03:00
3b72547621
changelog update 2023-10-13 14:20:33 +03:00
e81a96180a
Merge pull request #43 from EpicMorg/bugfix/fix-output-dir
Fix default output dir, enable nullables, fix compiler warnings
2023-10-13 14:13:46 +03:00
997f096cc1
Merge pull request #42 from EpicMorg/bugfix/fix-profiles
Remove redundant parameters from publish profiles
2023-10-13 14:12:03 +03:00
Konstantin Safonov
00000db63c
Fix default output dir, enable nullables, fix compiler warnings 2023-10-13 13:36:38 +03:00
Konstantin Safonov
000006654d
Remove redundant parameters from publish profiles 2023-10-13 13:17:39 +03:00
08256f0abe
metainfo 2023-10-13 02:30:30 +03:00
59fa3ebc5a
Merge pull request #40 from EpicMorg/feature/2.0
Feature/2.0
2023-10-13 02:08:03 +03:00
46ddd7ae54
2.0.0.0 2023-10-13 02:05:30 +03:00
b96d87ca33
Feature #39: added --user-agent flag 2023-10-13 01:46:28 +03:00
4f59498482
Feature #33: added --skip-file-check flag 2023-10-13 01:30:46 +03:00
ce023a7358
Fix #38: build config migrated to publish profiles. 2023-10-13 01:03:24 +03:00
Konstantin Safonov
00000a2119
Fix #36: restore args parsing.
Move bells and whistles from downloader service
Apply code styles.
Fix exception when parsing json
Move sources to a separate type
2023-10-12 23:33:26 +03:00
c2d6260d61
dotnet8 draft switch
x BROKEN x
2023-10-11 16:37:16 +03:00
a361285d62
gha fixes 2023-10-07 03:02:45 +03:00
1032f14948
gha fixes 2023-10-07 01:46:53 +03:00
338535ebee Update dependabot.yml 2023-10-06 23:55:41 +03:00
6ae51f919a
1.1.0.0
1.1.0.0
2023-10-06 23:48:08 +03:00
43504aebfc
pre 1.1.0.0 2023-10-06 23:30:08 +03:00
d764d0f018
Merge pull request #28 from FANAT--/master
Fix typo in readme
2023-09-29 16:34:09 +03:00
Павел Богданов
3d5e661e6d
Merge pull request #1 from FANAT--/FANAT-fix-readme-typo
Fix typo in readme
2023-08-25 03:29:55 +05:00
Павел Богданов
3d92803cee
Fix typo in readme
Requerments --> Requirements
2023-08-25 03:26:41 +05:00
0d761787d7
build scripts improvments 2023-07-21 12:33:11 +03:00
d39833ac9d
build scripts improvments 2023-07-21 12:32:50 +03:00
e8182ff9b4
1.0.1.1 links 2 2023-07-21 11:51:00 +03:00
4358ec73db
1.0.1.1 links 2 2023-07-21 11:50:47 +03:00
aed2e107b7
1.0.1.1 links 2023-07-21 00:09:21 +03:00
b3f71b7f37
1.0.1.1 links 2023-07-21 00:08:51 +03:00
eabfc260c3
1.0.1.1 2023-07-20 23:48:11 +03:00
429c42da51
1.0.1.1 2023-07-20 23:47:48 +03:00
bdd9fa0358
1.0.1.0
fix
2023-05-12 13:30:38 +03:00
b7250bfa9e
1.0.1.0
fix
2023-05-12 13:30:00 +03:00
c1d586363d
1.0.1.0
new release
2023-05-12 13:18:19 +03:00
83b8cb81c1
1.0.1.0
new release
2023-05-12 13:17:02 +03:00
71fcfde668
Merge remote-tracking branch 'origin/develop' into develop 2023-04-17 15:01:35 +03:00
ce5f24f609
docs 2023-04-17 15:01:27 +03:00
fbd5dd7f22
docs 2023-04-17 15:01:27 +03:00
44731d85fb
docs 2023-04-17 15:01:18 +03:00
ba53e09a25
docs 2023-04-17 14:50:39 +03:00
5d9331f88c
Merge branch 'develop' 2022-09-23 18:35:44 +03:00
d7bf8eea18
readme 2022-09-23 18:33:52 +03:00
ee353d906f
readme 2022-09-23 18:33:37 +03:00
7fa7bfa53f
readme 2022-09-23 18:22:49 +03:00
25beab44e3
readme 2022-09-23 18:21:13 +03:00
65a0081095
readme 2022-09-22 17:40:23 +03:00
87f1d7fd4e
screens 2022-09-22 17:38:06 +03:00
4b2adabb24
Merge branch 'master' into develop 2022-09-22 17:37:50 +03:00
08314b9509
Merge branch 'develop' 2022-09-22 17:22:39 +03:00
4b3ad68bf4
fix readme 2022-09-22 17:22:32 +03:00
4869e99798
Merge branch 'develop' 2022-09-22 17:21:02 +03:00
5ef7b83974
updated to stable 6.0 + updated deps 2022-09-22 17:20:50 +03:00
9285ee9eb8
1.0.0.9 2022-09-22 16:12:10 +03:00
Konstantin Safonov
99baf3ba5a
Update DonloaderService.cs 2021-11-21 13:08:16 +03:00
b945d410ac
Merge pull request #25 from EpicMorg/develop
1.0.0.8
2021-08-22 02:13:13 +03:00
2979a1e97d 1.0.0.8 2021-08-22 02:12:59 +03:00
1dc3c00741
Merge pull request #24 from EpicMorg/develop
1.0.0.8
2021-08-22 02:10:46 +03:00
9fce04c196 1.0.0.8 2021-08-22 02:10:28 +03:00
738d657061
1.0.0.8
Merge pull request #22 from EpicMorg/develop
2021-08-22 01:40:55 +03:00
ec70cdec85 1.0.0.8
* `1.0.0.8` - switched to `dontet6.0`, updated deps.
2021-08-22 01:38:43 +03:00
38dfee1469 build fix 2021-08-22 01:24:40 +03:00
6e9ae31f33 pre-1.0.0.8 2021-08-22 01:23:10 +03:00
e16f768c6b pre-1.0.0.8
* updated deps
* updated ui
2021-08-22 01:17:47 +03:00
8989cb80c1 Revert "6.0.0-preview"
This reverts commit 35644076a76f51d15da96d94c3509252621451ff.
2021-02-26 15:54:48 +03:00
35644076a7 6.0.0-preview 2021-02-26 15:49:45 +03:00
8a97800982 linux\macos fix 2021-02-26 15:44:22 +03:00
0ab86f6cbd
Merge pull request #21 from EpicMorg/develop
Merge pull request #20 from EpicMorg/master
2021-02-26 15:37:50 +03:00
5bc23cad6e
Merge pull request #20 from EpicMorg/master
sync
2021-02-26 15:37:29 +03:00
9c9963a7ab
Rename appSettings.json to appsettings.json 2021-02-26 15:36:40 +03:00
b04b2aae73
Merge pull request #19 from EpicMorg/develop
Update README.md
2021-01-26 01:58:55 +03:00
0edafc8d9a
Update README.md 2021-01-26 01:58:39 +03:00
b004782670
Update FUNDING.yml 2021-01-21 01:02:28 +03:00
Konstantin Safonov
5330ef0655
Update FUNDING.yml 2021-01-20 19:39:02 +03:00
Konstantin Safonov
ce22f43b1f
Update FUNDING.yml 2021-01-20 19:37:32 +03:00
145c8f3286 Create repo-logo.png 2021-01-20 01:27:08 +03:00
4d16f25ec8 readme updaet 2021-01-20 01:08:49 +03:00
74889a1b5c Merge branch 'develop' 2021-01-20 01:06:48 +03:00
bca4a1aa29 media fix 2021-01-20 01:06:31 +03:00
90cc59f61a
1.0.0.7
* `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.
2021-01-20 01:04:12 +03:00
23f092db9c release info 2021-01-20 01:01:26 +03:00
9840991639 Fixed typo
Fixed typo
2021-01-20 00:52:07 +03:00
0c9ce49dbe mkerge conflict resolve
https://github.com/EpicMorg/atlassian-downloader/pull/17
2021-01-20 00:45:15 +03:00
0b95530eed 1.0.0.7
* version page
* code improvments
2021-01-20 00:39:18 +03:00
f57c6e3986 CL LF 2021-01-19 19:11:27 +03:00
42aec2a48c Update config.yml 2021-01-19 16:19:24 +03:00
0c8b25734c readme fix 2021-01-19 16:13:16 +03:00
2faffc2d32 readme fix 2021-01-19 16:07:57 +03:00
480b43a3c8 readme fix 2021-01-19 16:05:37 +03:00
acbbfa2fb0 configs 2021-01-19 14:30:34 +03:00
e68f68d792 1.0.0.7
* sourcetree support
2021-01-17 13:45:28 +03:00
Konstantin Safonov
83980e6c77 Fix trailing whitespace, fix case handling 2021-01-17 05:12:33 +03:00
c42b0f7626 Revert "Merge branch 'master' into develop"
This reverts commit 5e0b74d89f61315a70a238356d6c0066fdc15162, reversing
changes made to e0f4bde3e55ec0938295d3506d1a82e9a61772c7.
2021-01-17 01:36:35 +03:00
5e0b74d89f Merge branch 'master' into develop 2021-01-17 01:35:59 +03:00
e0f4bde3e5
Merge pull request #14 from EpicMorg/feature/show-raw-json
Fixes for #7, #10, #12, #13 and general improvements
2021-01-16 19:51:25 +03:00
Konstantin Safonov
b36a7c10b8
Update FUNDING.yml 2021-01-16 17:56:21 +03:00
Konstantin Safonov
fbd0d48729 Fix mutually exclusive options, add an option to print JSONs, improve logging, fix hanging after completing the download, fix ctrl-c handling, add auto-removal for incomplete files, refactor the code 2021-01-16 17:27:22 +03:00
Konstantin Safonov
37dfc25963 Configure logger 2021-01-16 17:25:03 +03:00
1f7bf6b9ab 1.0.0.7
* show versions from feed
2021-01-16 13:25:29 +03:00
5428e862ca Update CHANGELOG.md 2021-01-15 02:42:47 +03:00
51 changed files with 1101 additions and 255 deletions

4
.github/FUNDING.yml vendored
View File

@ -1,7 +1,9 @@
# These are supported funding model platforms
patreon: epicmorg
patreon: kasthack
custom: https://www.patreon.com/epicmorg
ko_fi: epicmorg
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
#open_collective: # Replace with a single Open Collective username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel

20
.github/config.yml vendored Normal file
View File

@ -0,0 +1,20 @@
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
# Comment to be posted to on first time issues
newIssueWelcomeComment: >
:wave: Thank you for opening your first issue. I'm just an automated bot that's here to help you get the information you need quicker, so please ignore this message if it doesn't apply to your issue.
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: >
Congratulations on opening your first Pull Request, this is a momentous day for you and us! :sparkles:
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
Hooray! Your first Pull Request was merged, here's to many more :rocket:
# It is recommend to include as many gifs and emojis as possible

View File

@ -1,8 +1,8 @@
version: 2
updates:
- package-ecosystem: nuget
directory: "/src/atlassian-downloader"
- package-ecosystem: "nuget"
directory: "/src"
schedule:
interval: daily
interval: "daily"
time: "02:00"
open-pull-requests-limit: 10
open-pull-requests-limit: 10

BIN
.github/media/repo-logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
.github/media/screenshot-01.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
.github/media/screenshot-02.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
.github/media/screenshot-03.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

13
.github/no-response.yml vendored Normal file
View File

@ -0,0 +1,13 @@
# Configuration for probot-no-response - https://github.com/probot/no-response
# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 7
# Label requiring a response
responseRequiredLabel: more-information-needed
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

View File

@ -13,10 +13,14 @@ on:
jobs:
build:
runs-on: windows-2019
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8
dotnet-quality: 'preview'
- name: Restore
env:

View File

@ -4,16 +4,22 @@ on:
push:
branches:
- 'master'
tags:
- '*'
schedule:
- cron: '00 00 * * 6' # At 12:00 AM, only on Saturday
- cron: '02 00 * * 6' # At 02:00, only on Saturday
jobs:
build:
runs-on: windows-2019
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8
dotnet-quality: 'preview'
- name: Restore
env:

View File

@ -1,6 +1,26 @@
# Atlassian Downloader - Changelog
* `1.0.0.6` - added supoprt of `clover`. fixed broken json parsing. added new logger.
## 2.x
* `2.0.0.2` - minor update:
* Added `maxRetries (default: 5)` and `delayBetweenRetries (default: 2500, milliseconds)` args, to redownload file if connection will be reset.
* Updated dependencies.
* `2.0.0.1` - minor update:
* Fix default output dir, enable nullables, fix compiler warnings #43
* Remove redundant parameters from publish profiles #42
* `2.0.0.0` - migrated to `dotnet8` and updated libs.
* code optimized by [@kasthack](https://github.com/kasthack).
* reworked build scripts via `cli` and `vs`.
* added new dists - `osx-arm64`, `linux-bionic-x64`.
* added support of custom useragent via flag
* added suppor of skipping existing files via flag
## 1.x
* `1.1.0.0` - added automatic compare of local and remote file sizes. If they differ - the file will be re-downloaded.
* `1.0.1.1` - minor update: added `UserAgent` to HTTP headers and added mirrors of json files.
* `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.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.5` - added support for `EAP` releases.
* `1.0.0.4` - bump version. rewrited build scripts. added support of `arm` and `arm64`.
* `1.0.0.3` - some cosmetics improvements.

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2018-2021 EpicMorg: Main
Copyright (c) 2009 EpicMorg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

131
README.md
View File

@ -1,41 +1,136 @@
# [![Activity](https://img.shields.io/github/commit-activity/m/EpicMorg/atlassian-downloader?label=commits&style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/commits) [![GitHub issues](https://img.shields.io/github/issues/EpicMorg/atlassian-downloader.svg?style=popout-square)](https://github.com/EpicMorg/atlassian-downloader/issues) [![GitHub forks](https://img.shields.io/github/forks/EpicMorg/atlassian-downloader.svg?style=popout-square)](https://github.com/EpicMorg/atlassian-downloader/network) [![GitHub stars](https://img.shields.io/github/stars/EpicMorg/atlassian-downloader.svg?style=popout-square)](https://github.com/EpicMorg/atlassian-downloader/stargazers) [![Size](https://img.shields.io/github/repo-size/EpicMorg/atlassian-downloader?label=size&style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/archive/master.zip) [![Release](https://img.shields.io/github/v/release/EpicMorg/atlassian-downloader?style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/releases) [![GitHub license](https://img.shields.io/github/license/EpicMorg/atlassian-downloader.svg?style=popout-square)](LICENSE.md) [![Changelog](https://img.shields.io/badge/Changelog-yellow.svg?style=popout-square)](CHANGELOG.md)
# [![Activity](https://img.shields.io/github/commit-activity/m/EpicMorg/atlassian-downloader?label=commits&style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/commits) [![GitHub issues](https://img.shields.io/github/issues/EpicMorg/atlassian-downloader.svg?style=popout-square)](https://github.com/EpicMorg/atlassian-downloader/issues) [![GitHub forks](https://img.shields.io/github/forks/EpicMorg/atlassian-downloader.svg?style=popout-square)](https://github.com/EpicMorg/atlassian-downloader/network) [![GitHub stars](https://img.shields.io/github/stars/EpicMorg/atlassian-downloader.svg?style=popout-square)](https://github.com/EpicMorg/atlassian-downloader/stargazers) [![Size](https://img.shields.io/github/repo-size/EpicMorg/atlassian-downloader?label=size&style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/archive/master.zip) [![Release](https://img.shields.io/github/v/release/EpicMorg/atlassian-downloader?style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/releases) [![Downloads](https://img.shields.io/github/downloads/EpicMorg/atlassian-downloader/total.svg?style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/releases) [![GitHub license](https://img.shields.io/github/license/EpicMorg/atlassian-downloader.svg?style=popout-square)](LICENSE.md) [![Changelog](https://img.shields.io/badge/Changelog-yellow.svg?style=popout-square)](CHANGELOG.md)
# Atlassian Downloader
Console app written with `c#` and `dotnet5` for downloading all avalible products from `Atlassian`. Why not?
Console app written with `c#` and `dotnet8` for downloading all avalible products from `Atlassian`. Why not?
![Atlassian Downloader](https://rawcdn.githack.com/EpicMorg/atlassian-downloader/8fd59dfb0514aeff8556761c2f9862185d3489ea/.github/screenshot-1.png)
![Atlassian Downloader](https://rawcdn.githack.com/EpicMorg/atlassian-downloader/28d17af55fbd4944d75f70d6bcb702e409820f64/.github/media/screenshot-01.png)
![Atlassian Downloader](https://rawcdn.githack.com/EpicMorg/atlassian-downloader/28d17af55fbd4944d75f70d6bcb702e409820f64/.github/media/screenshot-03.png)
## Requerments
1. Preinstalled `dotnet5`. Download [here](https://dotnet.microsoft.com/download/dotnet/5.0).
2. Supported OS: `win32/win64`, `linux`, `macosx`, `arm/arm64`
# Supported OS:
`win-x86`, `win-x64`, `win-arm64`, `linux-x86`, `linux-x64`, `linux-musl-x64`, `linux-arm`, `linux-arm64`, `linux-bionic-x64`, `osx-x64`, `osx-arm64`
## How to
-------------------
# How to...
## ..develop
1. preinstall `dotnet8`. Download [here](https://dotnet.microsoft.com/download/dotnet/8.0).
2. preinstall `VS2022`. Download [here](https://visualstudio.microsoft.com/vs/).
3. `git clone` this repo.
4. `cd` to `<repo>/src`.
5. open `*.sln` file
6. ...
7. profit!
## ..build from scratch
1. `git clone` this repo.
2. `cd` to `<repo>/src`.
3. execute `donten run` in `src` folder.
4. by default all data will be downloaded to `src/atlassian` folder and subfolders.
3. execute `build.bat(sh)` in `src` folder.
4. by default all data will be downloaded to `src/Atlassian` folder and subfolders.
## Usage
## ..use binary versions
1. just download latest [![Downloads](https://img.shields.io/github/downloads/EpicMorg/atlassian-downloader/total.svg?style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/releases) [![Release](https://img.shields.io/github/v/release/EpicMorg/atlassian-downloader?style=flat-square)](https://github.com/EpicMorg/atlassian-downloader/releases)
2. ...
3. profit!
## ..intall via Chocolatey
| CLI | Version | Downloads
| ------ | ------ | ------
| :computer: `choco install atlassian-downloader` | [![Version](https://img.shields.io/chocolatey/v/atlassian-downloader?label=version&style=for-the-badge)](https://chocolatey.org/packages/atlassian-downloader/) | [![Version](https://img.shields.io/chocolatey/dt/atlassian-downloader?style=for-the-badge)](https://chocolatey.org/packages/atlassian-downloader/)
-------------------
# Usage and settings
## CLI args
![Atlassian Downloader](https://rawcdn.githack.com/EpicMorg/atlassian-downloader/28d17af55fbd4944d75f70d6bcb702e409820f64/.github/media/screenshot-02.png)
```
atlassian-downloader:
Atlassian archive downloader. See https://github.com/EpicMorg/atlassian-downloader for more info
Usage:
atlassian-downloader [options]
Options:
--output-dir <output-dir> Override output directory to download [default: atlassian]
--list Show all download links from feed without downloading [default: False]
--custom-feed <custom-feed> Override URIs to import. [default: ]
--version Show version information
-?, -h, --help Show help and usage information
--output-dir <output-dir> Override output directory to download
--custom-feed <custom-feed> Override URIs to import []
--action <Download|ListURLs|ListVersions|ShowRawJson> Action to perform [default: Download]
--about Show credits banner [default: False]
--product-version <product-version> Override target version to download some product. Advice: Use
it with "customFeed". []
--skip-file-check Skip compare of file sizes if a local file already exists.
Existing file will be skipped to check and redownload.
[default: False]
--user-agent <user-agent> Set custom user agent via this feature flag. [default:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0)
Gecko/20100101 Firefox/101.0]
--version Show version information
-?, -h, --help Show help and usage information
```
## Supported products:
## Example of usage:
### How to download it all at first time, or get update of local archive
```
PS> .\atlassian-downloader.exe --output-dir "P:\Atlassian"
or
bash# ./atlassian-downloader --output-dir "/mnt/nfs/atlassian"
```
If you already have some folders at output path - they will be ignored and not be downloaded again and skipped. Downloader will be download only new versions of files which not be present locally yet.
### Set only some url feed and dowload it:
```
PS> .\atlassian-downloader.exe --output-dir "P:\Atlassian" --custom-feed https://my.atlassian.com/download/feeds/current/bamboo.json
or
bash# ./atlassian-downloader --output-dir "/mnt/nfs/atlassian" --custom-feed https://my.atlassian.com/download/feeds/current/bamboo.json
```
### cron or crontab example
```
0 0 * 1 0 /opt/epicmorg/atlassian-downloader/atlassian-downloader --output-dir "/mnt/nfs/atlassian"
```
### Show only urls from jsons
```
PS> .\atlassian-downloader.exe --action ListURLs
or
bash# ./atlassian-downloader --action ListURLs
```
## Additional settings
File `src/appSettings.json` contains additional settings, like [loglevel](https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.loglevel?view=dotnet-plat-ext-5.0#fields) and [console output theme](https://github.com/serilog/serilog-sinks-console). You can set it up via editing this file.
### Supported log levels
| Level | Enum | Description
|-------------|:-------------:|-------------|
| `Critical` | `5` | Logs that describe an unrecoverable application or system crash, or a catastrophic failure that requires immediate attention.
| `Debug` | `1` | Logs that are used for interactive investigation during development. These logs should primarily contain information useful for debugging and have no long-term value.
| `Error` | `4` | Logs that highlight when the current flow of execution is stopped due to a failure. These should indicate a failure in the current activity, not an application-wide failure.
| `Information` | `2` | Logs that track the general flow of the application. These logs should have long-term value.
| `None` | `6` | Not used for writing log messages. Specifies that a logging category should not write any messages.
| `Trace` | `0` | Logs that contain the most detailed messages. These messages may contain sensitive application data. These messages are disabled by default and should never be enabled in a production environment.
| `Warning` | `3` | Logs that highlight an abnormal or unexpected event in the application flow, but do not otherwise cause the application execution to stop.
### Supported console themes
The following built-in themes are available, provided by `Serilog.Sinks.Console` package:
* `ConsoleTheme.None` - no styling
* `SystemConsoleTheme.Literate` - styled to replicate _Serilog.Sinks.Literate_, using the `System.Console` coloring modes supported on all Windows/.NET targets; **this is the default when no theme is specified**
* `SystemConsoleTheme.Grayscale` - a theme using only shades of gray, white, and black
* `AnsiConsoleTheme.Literate` - an ANSI 16-color version of the "literate" theme; we expect to update this to use 256-colors for a more refined look in future
* `AnsiConsoleTheme.Grayscale` - an ANSI 256-color version of the "grayscale" theme
* `AnsiConsoleTheme.Code` - an ANSI 256-color Visual Studio Code-inspired theme
-------------------
# Supported products:
| Product | Current | Archive | EAP |
|-------------|:-------------:|:-------------:|:-------------:|
| [![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(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=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: |
@ -44,11 +139,11 @@ Options:
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Jira%20Core&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/jira/core) | :white_check_mark: | :white_check_mark: | :x: |
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Jira%20Software&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/jira) | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Jira%20Servicedesk&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/jira/service-management) | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=SourceTree&color=yellow&style=for-the-badge)](https://www.atlassian.com/software/sourcetree) | :x: | :x: | :x: |
| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=SourceTree&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/sourcetree) | :white_check_mark: | :white_check_mark: | :x: |
* Archive of `Atlassian` jsons available [here](https://github.com/EpicMorg/atlassian-json).
------
-------------------
## Authors
* [@kasthack](https://github.com/kasthack) - code

BIN
docs/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
docs/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
docs/logging.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
docs/products.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,121 @@
namespace EpicMorg.Atlassian.Downloader.Models;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using Microsoft.Extensions.Logging;
internal class BellsAndWhistles
{
private static readonly string assemblyEnvironment = string.Format("[{1}, {0}]", RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant(), RuntimeInformation.FrameworkDescription);
private static readonly Assembly entryAssembly = Assembly.GetEntryAssembly()!;
private static readonly string assemblyVersion = entryAssembly.GetName().Version!.ToString();
private static readonly string fileVersion = entryAssembly.GetCustomAttribute<AssemblyFileVersionAttribute>()!.Version;
private static readonly string assemblyName = entryAssembly.GetCustomAttribute<AssemblyProductAttribute>()!.Product;
const string assemblyBuildType =
#if DEBUG
"[Debug]"
#else
"[Release]"
#endif
;
private const ConsoleColor DEFAULT = ConsoleColor.Blue;
public static void ShowVersionInfo(ILogger logger)
{
logger.LogInformation(
"{assemblyName} {assemblyVersion} {assemblyEnvironment} {assemblyBuildType}",
assemblyName,
assemblyVersion,
assemblyEnvironment,
assemblyBuildType);
Console.BackgroundColor = ConsoleColor.Black;
WriteColorLine("%╔═╦═══════════════════════════════════════════════════════════════════════════════════════╦═╗");
WriteColorLine("%╠═╝ .''. %╚═%╣");
WriteColorLine("%║ .:cc;. %║");
WriteColorLine("%║ .;cccc;. %║");
WriteColorLine("%║ .;cccccc;. !╔══════════════════════════════════════════════╗ %║");
WriteColorLine($"%║ .:ccccccc;. !║ {assemblyName} !║ %║");
WriteColorLine("%║ 'ccccccccc;. !╠══════════════════════════════════════════════╣ %║");
WriteColorLine("%║ ,cccccccccc;. !║ &Code: @kasthack !║ %║");
WriteColorLine("%║ ,ccccccccccc;. !║ &GFX: @stam !║ %║");
WriteColorLine("%║ .... .:ccccccccccc;. !╠══════════════════════════════════════════════╣ %║");
WriteColorLine($"%║ .',,'..;cccccccccccc;. !║ &Version: {fileVersion} !║ %║");
WriteColorLine("%║ .,,,,,'.';cccccccccccc;. !║ &GitHub: $EpicMorg/atlassian-downloader !║ %║");
WriteColorLine("%║ .,;;;;;,'.':cccccccccccc;. !╚══════════════════════════════════════════════╝ %║");
WriteColorLine("%║ .;:;;;;;;,...:cccccccccccc;. %║");
WriteColorLine("%║ .;:::::;;;;'. .;:ccccccccccc;. %║");
WriteColorLine("%║ .:cc::::::::,. ..:ccccccccccc;. %║");
WriteColorLine("%║ .:cccccc:::::' .:ccccccccccc;. %║");
WriteColorLine("%║ .;:::::::::::,. .;:::::::::::,. %║");
WriteColorLine("%╠═╗ ............ ............ %╔═╣");
WriteColorLine("%╚═╩═══════════════════════════════════════════════════════════════════════════════════════╩═╝");
Console.ResetColor();
}
public static void SetConsoleTitle() => Console.Title = $@"{assemblyName} {assemblyVersion} {assemblyEnvironment} - {assemblyBuildType}";
private static void WriteColorLine(string text, params object[] args)
{
Dictionary<char, ConsoleColor> colors = new()
{
{ '!', ConsoleColor.Red },
{ '@', ConsoleColor.Green },
{ '#', ConsoleColor.Blue },
{ '$', ConsoleColor.Magenta },
{ '&', ConsoleColor.Yellow },
{ '%', ConsoleColor.Cyan }
};
// TODO: word wrap, backslash escapes
text = string.Format(text, args);
var chunk = "";
var paren = false;
for (var i = 0; i < text.Length; i++)
{
var c = text[i];
if (colors.ContainsKey(c) && StringNext(text, i) != ' ')
{
Console.Write(chunk);
chunk = "";
if (StringNext(text, i) == '(')
{
i++; // skip past the paren
paren = true;
}
Console.ForegroundColor = colors[c];
}
else if (paren && c == ')')
{
paren = false;
Console.ForegroundColor = DEFAULT;
}
else if (Console.ForegroundColor != DEFAULT)
{
Console.Write(c);
if (c == ' ' && !paren)
{
Console.ForegroundColor = DEFAULT;
}
}
else
{
chunk += c;
}
}
Console.WriteLine(chunk);
Console.ForegroundColor = DEFAULT;
}
private static char StringNext(string text, int index) => index < text.Length ? text[index + 1] : '\0';
}

View File

@ -0,0 +1,259 @@
namespace EpicMorg.Atlassian.Downloader.Core;
using EpicMorg.Atlassian.Downloader.Models;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
internal class DownloaderService : IHostedService
{
private static readonly JsonSerializerOptions jsonOptions = new()
{
PropertyNameCaseInsensitive = true
};
private readonly ILogger<DownloaderService> logger;
private readonly DownloaderOptions options;
private readonly HttpClient client;
private readonly IHostApplicationLifetime hostApplicationLifetime;
public DownloaderService(IHostApplicationLifetime hostApplicationLifetime, ILogger<DownloaderService> logger, HttpClient client, DownloaderOptions options)
{
this.logger = logger;
this.client = client;
client.DefaultRequestHeaders.Add("User-Agent", options.UserAgent);
this.options = options;
this.hostApplicationLifetime = hostApplicationLifetime;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
BellsAndWhistles.SetConsoleTitle();
BellsAndWhistles.ShowVersionInfo(this.logger);
if (!this.options.Version && !string.IsNullOrWhiteSpace(this.options.OutputDir))
{
var feedUrls = this.GetFeedUrls();
this.logger.LogInformation($"Task started");
foreach (var feedUrl in feedUrls)
{
if (cancellationToken.IsCancellationRequested)
{
return;
}
var (json, versions) = await this.GetJson(feedUrl, this.options.ProductVersion, cancellationToken).ConfigureAwait(false);
switch (this.options.Action)
{
case DownloadAction.ShowRawJson:
Console.Out.WriteLine(json);
break;
case DownloadAction.Download:
await this.DownloadFilesFromFeed(feedUrl, versions, cancellationToken).ConfigureAwait(false);
break;
case DownloadAction.ListURLs:
foreach (var versionProg in versions)
{
foreach (var file in versionProg.Value)
{
Console.Out.WriteLine(file.ZipUrl);
}
}
break;
case DownloadAction.ListVersions:
foreach (var versionProg in versions)
{
foreach (var file in versionProg.Value)
{
Console.Out.WriteLine(file.Version);
}
}
break;
}
}
}
this.logger.LogInformation($"Complete");
this.hostApplicationLifetime.StopApplication();
}
private async Task<(string json, IDictionary<string, ResponseItem[]> versions)> GetJson(string feedUrl, string? productVersion = null, CancellationToken cancellationToken = default)
{
var atlassianJson = await this.client.GetStringAsync(feedUrl, cancellationToken).ConfigureAwait(false);
var json = atlassianJson.Trim()["downloads(".Length..^1];
this.logger.LogTrace("Downloaded json: {json}", json);
var parsed = JsonSerializer.Deserialize<ResponseItem[]>(json, jsonOptions)!;
this.logger.LogDebug("Found {releaseCount} releases", parsed.Length);
var versions = parsed
.GroupBy(a => a.Version)
.Where(a => productVersion is null || a.Key == productVersion)
.ToDictionary(a => a.Key, a => a.ToArray());
this.logger.LogDebug("Found {releaseCount} releases", versions.Count);
return (json, versions);
}
private IReadOnlyList<string> GetFeedUrls() => this.options.CustomFeed != null
? this.options.CustomFeed.Select(a => a.ToString()).ToArray()
: SourceInformation.AtlassianSources;
private async Task DownloadFilesFromFeed(string feedUrl, IDictionary<string, ResponseItem[]> versions, CancellationToken cancellationToken)
{
var feedDir = Path.Combine(this.options.OutputDir, feedUrl[(feedUrl.LastIndexOf('/') + 1)..feedUrl.LastIndexOf('.')]);
this.logger.LogInformation("Download from JSON \"{feedUrl}\" started", feedUrl);
foreach (var version in versions)
{
if (cancellationToken.IsCancellationRequested)
{
return;
}
var directory = Path.Combine(feedDir, version.Key);
if (!Directory.Exists(directory))
{
_ = Directory.CreateDirectory(directory);
}
foreach (var file in version.Value)
{
if (cancellationToken.IsCancellationRequested)
{
return;
}
if (file.ZipUrl == null)
{
this.logger.LogWarning("Empty ZipUrl found for version '{version}' in {feedUrl}", version.Key, feedUrl);
continue;
}
var serverPath = file.ZipUrl.PathAndQuery;
var outputFile = Path.Combine(directory, serverPath[(serverPath.LastIndexOf('/') + 1)..]);
if (!File.Exists(outputFile))
{
await this.DownloadFile(file, outputFile, cancellationToken).ConfigureAwait(false);
}
else
{
if (this.options.SkipFileCheck == false)
{
this.logger.LogWarning("File \"{outputFile}\" already exists. File sizes will be compared.", outputFile);
var localFileSize = new FileInfo(outputFile).Length;
this.logger.LogInformation("Size of local file is {localFileSize} bytes.", localFileSize);
try
{
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Add("User-Agent", options.UserAgent);
var response = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, file.ZipUrl), cancellationToken);
if (response.IsSuccessStatusCode)
{
if (response.Content.Headers.ContentLength.HasValue)
{
var remoteFileSize = response.Content.Headers.ContentLength.Value;
this.logger.LogInformation("Size of remote file is \"{remoteFileSize}\" bytes.", remoteFileSize);
if (remoteFileSize == localFileSize)
{
this.logger.LogInformation(
"Size of remote and local files and are same ({remoteFileSize} bytes and {localFileSize} bytes). Nothing to download. Operation skipped.",
remoteFileSize,
localFileSize);
}
else
{
this.logger.LogWarning(
"Size of remote and local files and are not same ({remoteFileSize} bytes and {localFileSize} bytes). Download started.",
remoteFileSize,
localFileSize);
File.Delete(outputFile);
await this.DownloadFile(file, outputFile, cancellationToken).ConfigureAwait(false);
}
}
else
{
this.logger.LogWarning("Cant get size of remote file \"{uri}\". May be server not support it feature. Sorry.", file.ZipUrl);
continue;
}
}
else
{
this.logger.LogError("Request execution error for {uri}: \"{statusCode}\". Sorry.", file.ZipUrl, response.StatusCode);
}
}
catch (HttpRequestException ex)
{
this.logger.LogError(ex, "HTTP request error for {uri}: \"{message}\", \"{statusCode}\". Sorry.", file.ZipUrl, ex.Message, ex.StatusCode);
}
}
else
{
logger.LogWarning("File \"{outputFile}\" already exists. Download from \"{uri}\" skipped.", outputFile, file.ZipUrl);
continue;
}
}
}
}
this.logger.LogInformation("All files from \"{feedUrl}\" successfully downloaded.", feedUrl);
}
private async Task DownloadFile(ResponseItem file, string outputFile, CancellationToken cancellationToken)
{
for (int attempt = 1; attempt <= options.MaxRetries; attempt++)
{
if (!string.IsNullOrEmpty(file.Md5))
{
File.WriteAllText(outputFile + ".md5", file.Md5);
}
try
{
using var outputStream = File.OpenWrite(outputFile);
using var request = await this.client.GetStreamAsync(file.ZipUrl, cancellationToken).ConfigureAwait(false);
await request.CopyToAsync(outputStream, cancellationToken).ConfigureAwait(false);
}
catch (Exception downloadEx)
{
this.logger.LogError(downloadEx, "Attempt {attempt} failed to download file \"{uri}\" to \"{outputFile}\".", attempt, file.ZipUrl, outputFile);
if (attempt == options.MaxRetries)
{
this.logger.LogError(downloadEx, "Failed to download file \"{uri}\" to \"{outputFile}\".", file.ZipUrl, outputFile);
try
{
File.Delete(outputFile);
}
catch (Exception removeEx)
{
this.logger.LogError(removeEx, "Failed to remove incomplete file \"{outputFile}\".", outputFile);
}
throw;
}
else
{
await Task.Delay(options.DelayBetweenRetries, cancellationToken).ConfigureAwait(false);
}
}
this.logger.LogInformation("File \"{uri}\" successfully downloaded to \"{outputFile}\".", file.ZipUrl, outputFile);
}
}
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
public async Task StopAsync(CancellationToken cancellationToken) { }
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
}

View File

@ -0,0 +1,21 @@
namespace EpicMorg.Atlassian.Downloader;
public enum DownloadAction
{
/// <summary>
/// Download application files
/// </summary>
Download,
/// <summary>
/// Print download URLs and exit
/// </summary>
ListURLs,
/// <summary>
/// Print available application versions and exit
/// </summary>
ListVersions,
/// <summary>
/// Print feed JSONs to stdout and exit
/// </summary>
ShowRawJson,
}

View File

@ -0,0 +1,14 @@
namespace EpicMorg.Atlassian.Downloader;
using System;
public record DownloaderOptions(
string OutputDir,
Uri[]? CustomFeed,
DownloadAction Action,
bool Version,
string? ProductVersion,
bool SkipFileCheck,
string UserAgent,
int MaxRetries,
int DelayBetweenRetries
) { }

View File

@ -0,0 +1,19 @@
namespace EpicMorg.Atlassian.Downloader;
using System;
public partial class ResponseItem
{
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 required string Version { get; set; }
public Uri? ReleaseNotes { get; set; }
public Uri? UpgradeNotes { get; set; }
}

View File

@ -0,0 +1,85 @@
namespace EpicMorg.Atlassian.Downloader.Models;
using System.Collections.Generic;
internal static class SourceInformation
{
public static IReadOnlyList<string> AtlassianSources { get; } = new[] {
//official links
"https://my.atlassian.com/download/feeds/archived/bamboo.json",
"https://my.atlassian.com/download/feeds/archived/clover.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/archived/mesh.json",
//cdn mirror of official links
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/bamboo.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/clover.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/confluence.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/crowd.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/crucible.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/fisheye.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/jira-core.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/jira-servicedesk.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/jira-software.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/jira.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/stash.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/mesh.json",
//official links
"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/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",
"https://my.atlassian.com/download/feeds/current/mesh.json",
//cdn mirror of official links
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/bamboo.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/clover.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/confluence.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/crowd.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/crucible.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/fisheye.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/jira-core.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/jira-servicedesk.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/jira-software.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/stash.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/mesh.json",
//official links
"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/jira.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/mesh.json", //404
//cdn mirror of official links
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/eap/bamboo.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/eap/confluence.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/eap/jira.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/eap/jira-servicedesk.json",
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/eap/stash.json",
//"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/eap/mesh.json", //404
//https://raw.githubusercontent.com/EpicMorg/atlassian-json/master/json-backups/archived/sourcetree.json //unstable link with r\l
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/archived/sourcetree.json",
//https://raw.githubusercontent.com/EpicMorg/atlassian-json/master/json-backups/current/sourcetree.json //unstable link with r\l
"https://raw.githack.com/EpicMorg/atlassian-json/master/json-backups/current/sourcetree.json"
};
}

View File

@ -1,180 +1,73 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using System;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
namespace EpicMorg.Atlassian.Downloader {
class Program : IHostedService {
private readonly ILogger<Program> logger;
private readonly Arguments arguments;
public Program(ILogger<Program> logger,Arguments arguments) {
this.logger = logger;
this.arguments = arguments;
}
/// <summary>
///
/// </summary>
/// <param name="outputDir">Override output directory to download</param>
/// <param name="list">Show all download links from feed without downloading</param>
/// <param name="customFeed">Override URIs to import.</param>
/// <returns></returns>
static async Task Main(string outputDir = "atlassian", bool list = false, Uri[] customFeed = null) => await
Host
.CreateDefaultBuilder()
.ConfigureHostConfiguration(configHost => configHost.AddEnvironmentVariables())
.ConfigureAppConfiguration((ctx, configuration) => {
configuration
.SetBasePath(Environment.CurrentDirectory)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{ctx.HostingEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables();
})
.ConfigureServices((ctx, services) => {
services
.AddOptions()
.AddLogging(builder => {
builder.ClearProviders();
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(ctx.Configuration)
.CreateLogger();
builder.AddSerilog(dispose: true);
});
services.AddHostedService<Program>();
services.AddSingleton(new Arguments(outputDir, list, customFeed));
})
.RunConsoleAsync();
public record Arguments(string outputDir = "atlassian", bool list = false, Uri[] customFeed = null);
public async Task StartAsync(CancellationToken cancellationToken) {
var appTitle = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
var appVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
var appStartupDate = DateTime.Now;
var appBuildType = "[Release]";
#if DEBUG
appBuildType = "[Debug]";
#endif
var feedUrls = arguments.customFeed != null
? arguments.customFeed.Select(a => a.ToString()).ToArray()
: new[] {
"https://my.atlassian.com/download/feeds/archived/bamboo.json",
"https://my.atlassian.com/download/feeds/archived/clover.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/clover.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",
"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/jira.json",
"https://my.atlassian.com/download/feeds/eap/jira-servicedesk.json",
"https://my.atlassian.com/download/feeds/eap/stash.json"
};
Console.Title = $"{appTitle} {appVersion} {appBuildType}";
logger.LogTrace($"Task started at {appStartupDate}.");
var client = new HttpClient();
foreach (var feedUrl in feedUrls) {
var feedDir = Path.Combine(arguments.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 versionsProg = parsed.GroupBy(a => a.Version).ToDictionary(a => a.Key, a => a.ToArray());
if (arguments.list) {
foreach (var versionProg in versionsProg) {
foreach (var file in versionProg.Value) {
Console.WriteLine(file.ZipUrl);
}
}
} else {
logger.LogInformation($"Download from JSON \"{feedUrl}\" started at {appStartupDate}.");
foreach (var versionProg in versionsProg) {
var directory = Path.Combine(feedDir, versionProg.Key);
if (!Directory.Exists(directory)) {
Directory.CreateDirectory(directory);
}
foreach (var file in versionProg.Value) {
if (file.ZipUrl == null) { continue; }
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.ForegroundColor = ConsoleColor.Green;
logger.LogInformation($"File \"{file.ZipUrl}\" successfully downloaded to \"{outputFile}\".");
// Console.ResetColor();
} else {
// Console.ForegroundColor = ConsoleColor.Yellow;
logger.LogWarning($"File \"{outputFile}\" already exists. Download from \"{file.ZipUrl}\" skipped.");
// Console.ResetColor();
}
}
}
logger.LogTrace($"All files from \"{feedUrl}\" successfully downloaded.");
}
}
logger.LogTrace($"Download complete at {appStartupDate}.");
}
public Task StopAsync(CancellationToken cancellationToken) {
throw new NotImplementedException();
}
}
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; }
}
namespace EpicMorg.Atlassian.Downloader;
using EpicMorg.Atlassian.Downloader.Core;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using System;
using System.Threading.Tasks;
public class Program
{
/// <summary>
/// Atlassian archive downloader. See https://github.com/EpicMorg/atlassian-downloader for more info
/// </summary>
/// <param name="action">Action to perform</param>
/// <param name="outputDir">Override output directory to download</param>
/// <param name="customFeed">Override URIs to import</param>
/// <param name="about">Show credits banner</param>
/// <param name="productVersion">Override target version to download some product. Advice: Use it with "customFeed".</param>
/// <param name="skipFileCheck">Skip compare of file sizes if a local file already exists. Existing file will be skipped to check and redownload.</param>
/// <param name="userAgent">Set custom user agent via this feature flag.</param>
/// <param name="maxRetries">Set custom count of download retries.</param>
/// <param name="delayBetweenRetries">Set custom delay between retries (in milliseconds).</param>
static async Task Main(
string? outputDir = default,
Uri[]? customFeed = null,
DownloadAction action = DownloadAction.Download,
bool about = false,
string? productVersion = null,
bool skipFileCheck = false,
int maxRetries = 5,
int delayBetweenRetries = 2500,
string userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0") => await
Host
.CreateDefaultBuilder()
.ConfigureHostConfiguration(configHost => configHost.AddEnvironmentVariables())
.ConfigureAppConfiguration((ctx, configuration) =>
configuration
.SetBasePath(System.AppContext.BaseDirectory)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{ctx.HostingEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables())
.ConfigureServices((ctx, services) => services
.AddOptions()
.AddLogging(builder =>
{
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(ctx.Configuration)
.CreateLogger();
_ = builder
.ClearProviders()
.AddSerilog(dispose: true);
})
.AddHostedService<DownloaderService>()
.AddSingleton(new DownloaderOptions(
outputDir ?? Environment.CurrentDirectory,
customFeed,
action,
about,
productVersion,
skipFileCheck,
userAgent,
maxRetries,
delayBetweenRetries))
.AddHttpClient())
.RunConsoleAsync()
.ConfigureAwait(false);
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-arm\publish\</PublishDir>
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-arm64\publish\</PublishDir>
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-bionic-x64\publish\</PublishDir>
<RuntimeIdentifier>linux-bionic-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-musl-x64\publish\</PublishDir>
<RuntimeIdentifier>linux-musl-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\linux-x64\publish\</PublishDir>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\osx-arm64\publish\</PublishDir>
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\osx-x64\publish\</PublishDir>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\win-arm64\publish\</PublishDir>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\win-x64\publish\</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<!--target runtime-->
<PublishDir>bin\Release\net8.0\win-x86\publish\</PublishDir>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
</Project>

View File

@ -0,0 +1,10 @@
{
"profiles": {
"atlassian-downloader": {
"commandName": "Project",
//"commandLineArgs": "--version"
"commandLineArgs": "--help"
// "commandLineArgs": "--action=ShowRawJson --output-dir=F:\\temp\\atlassian\\test1"
}
}
}

View File

@ -1,8 +1,14 @@
{
"Serilog": {
"MinimumLevel": "Verbose",
"MinimumLevel": "Information",
"WriteTo": [
"Console",
{
"Name": "Console",
"Args": {
"theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console"
}
}
,
{
"Name": "Logger",
"Args": {
@ -21,4 +27,4 @@
}
]
}
}
}

View File

@ -1,50 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<PublishSingleFile>true</PublishSingleFile>
<!--publish config-->
<PublishSingleFile>false</PublishSingleFile>
<PublishTrimmed>false</PublishTrimmed>
<PublishAot>false</PublishAot>
<SelfContained>true</SelfContained>
<PublishReadyToRun>false</PublishReadyToRun>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishTrimmed>true</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun>
<TargetFramework>net5.0</TargetFramework>
<!--build props-->
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<!--package metadata-->
<PackageId>EpicMorg.Atlassian.Downloader</PackageId>
<Authors>Atlassian Downloader</Authors>
<Description>Atlassian Downloader by EpicMorg, code by kasthack</Description>
<Authors>EpicMorg, kasthack, stam</Authors>
<Description>Atlassian Downloader by EpicMorg</Description>
<PackageProjectUrl>https://github.com/EpicMorg/atlassian-downloader</PackageProjectUrl>
<PackageIcon>favicon.png</PackageIcon>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/EpicMorg/atlassian-downloader</RepositoryUrl>
<PackageTags>atlassian, donwloader, epicmorg</PackageTags>
<AssemblyVersion>1.0.0.6</AssemblyVersion>
<FileVersion>1.0.0.6</FileVersion>
<Version>1.0.0.6</Version>
<Copyright>EpicMorg 2021</Copyright>
<AssemblyVersion>2.0.0.2</AssemblyVersion>
<FileVersion>2.0.0.2</FileVersion>
<Version>2.0.0.2</Version>
<Copyright>EpicMorg 2024</Copyright>
<Product>Atlassian Downloader</Product>
<IsPackable>true</IsPackable>
<Company>EpicMorg</Company>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RootNamespace>EpicMorg.Atlassian.Downloader</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.2-dev-10284" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.2.0-dev-00264" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0-dev-00839" />
<PackageReference Include="Serilog" Version="2.10.1-dev-01265" />
<PackageReference Include="System.CommandLine.DragonFruit" Version="0.3.0-alpha.20574.7" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.2" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog" Version="4.0.1" />
<PackageReference Include="System.CommandLine.DragonFruit" Version="0.4.0-alpha.22272.1" />
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="favicon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
<PackagePath>
</PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Update="appSettings.json">
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
</Project>

View File

@ -1,10 +1,47 @@
SET DOTNET_CLI_TELEMETRY_OPTOUT=true
SET DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
dotnet.exe publish -r win7-x64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=true -p:PublishSingleFile=false -p:PublishReadyToRun=true
dotnet.exe publish -r win7-x86 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=true -p:PublishSingleFile=false -p:PublishReadyToRun=true
dotnet.exe publish -r win81-arm --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=true -p:PublishSingleFile=false -p:PublishReadyToRun=true
dotnet.exe publish -r win10-arm64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=true -p:PublishSingleFile=false -p:PublishReadyToRun=true
dotnet.exe publish -r linux-x64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet.exe publish -r linux-musl-x64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet.exe publish -r osx-x64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet.exe publish -p:PublishProfile=win-x64 --force
dotnet.exe publish -p:PublishProfile=win-x86 --force
dotnet.exe publish -p:PublishProfile=win-arm64 --force
dotnet.exe publish -p:PublishProfile=osx-x64 --force
dotnet.exe publish -p:PublishProfile=osx-arm64 --force
dotnet.exe publish -p:PublishProfile=linux-x64 --force
dotnet.exe publish -p:PublishProfile=linux-musl-x64 --force
dotnet.exe publish -p:PublishProfile=linux-arm --force
dotnet.exe publish -p:PublishProfile=linux-arm64 --force
dotnet.exe publish -p:PublishProfile=linux-bionic-x64 --force
del /F bin\\Release\\net8.0\\win-x64\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\win-x86\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\win-arm64\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\osx-x64\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\osx-arm64\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\linux-x64\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\linux-musl-x64\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\linux-arm\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\linux-arm64\\publish\\atlassian-downloader.pdb
del /F bin\\Release\\net8.0\\linux-bionic-x64\\publish\\atlassian-downloader.pdb
type nul > bin/Release/net8.0/win-x64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/win-x86/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/win-arm64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/osx-x64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/osx-arm64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-x64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-musl-x64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-arm/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-arm64/publish/createdump.exe.ignore
type nul > bin/Release/net8.0/linux-bionic-x64/publish/createdump.exe.ignore
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-win-x64.zip ./bin/Release/net8.0/win-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-win-x86.zip ./bin/Release/net8.0/win-x86/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-win-arm64.zip ./bin/Release/net8.0/win-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-osx-x64.zip ./bin/Release/net8.0/osx-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-osx-arm64.zip ./bin/Release/net8.0/osx-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-x64.zip ./bin/Release/net8.0/linux-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-musl-x64.zip ./bin/Release/net8.0/linux-musl-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-arm.zip ./bin/Release/net8.0/linux-arm/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-arm64.zip ./bin/Release/net8.0/linux-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-bionic-x64.zip ./bin/Release/net8.0/linux-bionic-x64/publish/*

View File

@ -1,11 +1,47 @@
#!/bin/bash
#!/./bin/bash
export DOTNET_CLI_TELEMETRY_OPTOUT=true
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
dotnet publish -r win7-x64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=true -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet publish -r win7-x86 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=true -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet publish -r win81-arm --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=true -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet publish -r win10-arm64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=true -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet publish -r linux-x64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet publish -r linux-musl-x64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet publish -r osx-x64 --self-contained true --framework net5.0 --configuration Release -p:PublishTrimmed=false -p:PublishSingleFile=false -p:PublishReadyToRun=false
dotnet publish -p:PublishProfile=win-x64 --force
dotnet publish -p:PublishProfile=win-x86 --force
dotnet publish -p:PublishProfile=win-arm64 --force
dotnet publish -p:PublishProfile=osx-x64 --force
dotnet publish -p:PublishProfile=osx-arm64 --force
dotnet publish -p:PublishProfile=linux-x64 --force
dotnet publish -p:PublishProfile=linux-musl-x64 --force
dotnet publish -p:PublishProfile=linux-arm --force
dotnet publish -p:PublishProfile=linux-arm64 --force
dotnet publish -p:PublishProfile=linux-bionic-x64 --force
rm -rfv ./bin/Release/net8.0/win-x64/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/win-x86/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/win-arm64/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/osx-x64/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/osx-arm64/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/linux-x64/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/linux-musl-x64/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/linux-arm/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/linux-arm64/publish/atlassian-downloader.pdb
rm -rfv ./bin/Release/net8.0/linux-bionic-x64/publish/atlassian-downloader.pdb
touch ./bin/Release/net8.0/win-x64/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/win-x86/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/win-arm64/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/osx-x64/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/osx-arm64/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/linux-x64/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/linux-musl-x64/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/linux-arm/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/linux-arm64/publish/createdump.exe.ignore
touch ./bin/Release/net8.0/linux-bionic-x64/publish/createdump.exe.ignore
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-win-x64.zip ././bin/Release/net8.0/win-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-win-x86.zip ././bin/Release/net8.0/win-x86/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-win-arm64.zip ././bin/Release/net8.0/win-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-osx-x64.zip ././bin/Release/net8.0/osx-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-osx-arm64.zip ././bin/Release/net8.0/osx-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-x64.zip ././bin/Release/net8.0/linux-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-musl-x64.zip ././bin/Release/net8.0/linu-musl-x64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-arm.zip ././bin/Release/net8.0/linux-arm/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-arm64.zip ././bin/Release/net8.0/linux-arm64/publish/*
7z a -tzip -mx5 -r0 ./bin/atlassian-downloader-net8.0-linux-bionic-x64.zip ././bin/Release/net8.0/linu-bionic-x64/publish/*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 107 KiB