├── .codespellignore
├── .github
├── matcher-python.json
├── release-please-config.json
├── release-please-manifest.json
└── workflows
│ ├── actions
│ └── python
│ │ └── action.yml
│ ├── ci.yml
│ └── release-please.yml
├── .gitignore
├── .pre-commit-config.yaml
├── CHANGELOG.md
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── e2e
└── install_test.py
├── examples.sh
├── gh_release_install
├── __init__.py
├── checksum.py
├── cli.py
├── main.py
└── unpack.py
├── poetry.lock
├── pyproject.toml
├── renovate.json
└── tests
├── checksum_test.py
├── conftest.py
├── fixtures
├── gh_releases_latest.json
└── test.txt.bz2
├── main_test.py
└── unpack_test.py
/.codespellignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jooola/gh-release-install/33809112c020ae83dccc2f11caa5e90d3c65c182/.codespellignore
--------------------------------------------------------------------------------
/.github/matcher-python.json:
--------------------------------------------------------------------------------
1 | {
2 | "problemMatcher": [
3 | {
4 | "owner": "pylint-error",
5 | "severity": "error",
6 | "pattern": [
7 | {
8 | "regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): (.*)\\((.*)\\)$",
9 | "file": 1,
10 | "line": 2,
11 | "column": 3,
12 | "code": 6,
13 | "message": 5
14 | }
15 | ]
16 | },
17 | {
18 | "owner": "pylint-warning",
19 | "severity": "warning",
20 | "pattern": [
21 | {
22 | "regexp": "^([^:]+):(\\d+):(\\d+): (W\\d+): (.*)\\((.*)\\)$",
23 | "file": 1,
24 | "line": 2,
25 | "column": 3,
26 | "code": 6,
27 | "message": 5
28 | }
29 | ]
30 | },
31 | {
32 | "owner": "mypy-error",
33 | "severity": "error",
34 | "pattern": [
35 | {
36 | "regexp": "^([^:]+):(\\d+): error: (.*)$",
37 | "file": 1,
38 | "line": 2,
39 | "message": 3
40 | }
41 | ]
42 | }
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/.github/release-please-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3 | "bootstrap-sha": "e0c14902e04a94400d543861f630beadb5156114",
4 | "include-component-in-tag": false,
5 | "packages": {
6 | ".": {
7 | "release-type": "python",
8 | "package-name": "gh-release-install"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/.github/release-please-manifest.json:
--------------------------------------------------------------------------------
1 | {".":"0.11.2"}
2 |
--------------------------------------------------------------------------------
/.github/workflows/actions/python/action.yml:
--------------------------------------------------------------------------------
1 | name: Setup python
2 | description: Setup python, poetry and caching
3 |
4 | inputs:
5 | python-version:
6 | required: true
7 |
8 | runs:
9 | using: composite
10 | steps:
11 | - uses: actions/setup-python@v5
12 | with:
13 | python-version: ${{ inputs.python-version }}
14 |
15 | - run: pipx install poetry
16 | shell: bash
17 |
18 | - uses: actions/cache@v4
19 | with:
20 | path: ${{ env.POETRY_CACHE_DIR }}
21 | key: ${{ runner.os }}-py${{ inputs.python-version }}-poetry-v1-${{ hashFiles('**/poetry.lock') }}
22 | restore-keys: |
23 | ${{ runner.os }}-py${{ inputs.python-version }}-poetry-v1-
24 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | tags: ["v*.*.*"]
6 | branches: [main]
7 | pull_request:
8 | branches: [main]
9 |
10 | env:
11 | POETRY_CACHE_DIR: ${{ github.workspace }}/.cache/poetry
12 |
13 | jobs:
14 | pre-commit:
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - uses: actions/checkout@v4
19 |
20 | - uses: ./.github/workflows/actions/python
21 | with:
22 | python-version: "3.10"
23 |
24 | - run: make install
25 |
26 | - uses: pre-commit/action@v3.0.1
27 |
28 | lint:
29 | runs-on: ubuntu-latest
30 | steps:
31 | - uses: actions/checkout@v4
32 |
33 | - uses: ./.github/workflows/actions/python
34 | with:
35 | python-version: "3.10"
36 |
37 | - run: make install
38 | - run: echo "::add-matcher::.github/matcher-python.json"
39 | - run: make lint
40 |
41 | test:
42 | needs: lint
43 | runs-on: ubuntu-latest
44 | strategy:
45 | matrix:
46 | os: [ubuntu-latest]
47 | python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
48 |
49 | env:
50 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51 |
52 | steps:
53 | - uses: actions/checkout@v4
54 |
55 | - uses: ./.github/workflows/actions/python
56 | with:
57 | python-version: ${{ matrix.python-version }}
58 |
59 | - run: make install
60 | - run: make test
61 | - run: make e2e
62 | - run: make examples
63 |
64 | publish:
65 | needs: test
66 | runs-on: ubuntu-latest
67 | if: startsWith(github.ref, 'refs/tags')
68 | steps:
69 | - uses: actions/checkout@v4
70 |
71 | - uses: ./.github/workflows/actions/python
72 | with:
73 | python-version: "3.10"
74 |
75 | - run: make install
76 | - run: >
77 | POETRY_PYPI_TOKEN_PYPI=${{ secrets.PYPI_TOKEN }}
78 | make ci-publish
79 |
80 | publish-docker:
81 | needs: test
82 | runs-on: ubuntu-latest
83 | if: startsWith(github.ref, 'refs/tags')
84 |
85 | env:
86 | REGISTRY: ghcr.io
87 | IMAGE_NAME: ${{ github.repository }}
88 |
89 | steps:
90 | - name: Checkout repository
91 | uses: actions/checkout@v4
92 |
93 | - name: Login to the Container registry
94 | uses: docker/login-action@v3
95 | with:
96 | registry: ${{ env.REGISTRY }}
97 | username: ${{ github.actor }}
98 | password: ${{ secrets.GITHUB_TOKEN }}
99 |
100 | - name: Extract metadata (tags, labels)
101 | id: meta
102 | uses: docker/metadata-action@v5
103 | with:
104 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
105 |
106 | - name: Build and push
107 | uses: docker/build-push-action@v6
108 | with:
109 | context: .
110 | push: true
111 | tags: ${{ steps.meta.outputs.tags }}
112 | labels: ${{ steps.meta.outputs.labels }}
113 |
--------------------------------------------------------------------------------
/.github/workflows/release-please.yml:
--------------------------------------------------------------------------------
1 | name: Release please
2 |
3 | on:
4 | push:
5 | branches: [main]
6 |
7 | jobs:
8 | release-please:
9 | if: github.repository == 'jooola/gh-release-install'
10 |
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: google-github-actions/release-please-action@v4
14 | with:
15 | token: ${{ secrets.RELEASE_TOKEN }}
16 | config-file: .github/release-please-config.json
17 | manifest-file: .github/release-please-manifest.json
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Custom .gitignore
2 | ################################################################################
3 |
4 | # Poetry
5 | .installed
6 |
7 | ## Github Python .gitignore
8 | ## See https://github.com/github/gitignore/blob/master/Python.gitignore
9 | ################################################################################
10 |
11 | # Byte-compiled / optimized / DLL files
12 | __pycache__/
13 | *.py[cod]
14 | *$py.class
15 |
16 | # C extensions
17 | *.so
18 |
19 | # Distribution / packaging
20 | .Python
21 | build/
22 | develop-eggs/
23 | dist/
24 | downloads/
25 | eggs/
26 | .eggs/
27 | lib/
28 | lib64/
29 | parts/
30 | sdist/
31 | var/
32 | wheels/
33 | pip-wheel-metadata/
34 | share/python-wheels/
35 | *.egg-info/
36 | .installed.cfg
37 | *.egg
38 | MANIFEST
39 |
40 | # PyInstaller
41 | # Usually these files are written by a python script from a template
42 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
43 | *.manifest
44 | *.spec
45 |
46 | # Installer logs
47 | pip-log.txt
48 | pip-delete-this-directory.txt
49 |
50 | # Unit test / coverage reports
51 | htmlcov/
52 | .tox/
53 | .nox/
54 | .coverage
55 | .coverage.*
56 | .cache
57 | nosetests.xml
58 | coverage.xml
59 | *.cover
60 | *.py,cover
61 | .hypothesis/
62 | .pytest_cache/
63 |
64 | # Translations
65 | *.mo
66 | *.pot
67 |
68 | # Django stuff:
69 | *.log
70 | local_settings.py
71 | db.sqlite3
72 | db.sqlite3-journal
73 |
74 | # Flask stuff:
75 | instance/
76 | .webassets-cache
77 |
78 | # Scrapy stuff:
79 | .scrapy
80 |
81 | # Sphinx documentation
82 | docs/_build/
83 |
84 | # PyBuilder
85 | target/
86 |
87 | # Jupyter Notebook
88 | .ipynb_checkpoints
89 |
90 | # IPython
91 | profile_default/
92 | ipython_config.py
93 |
94 | # pyenv
95 | .python-version
96 |
97 | # pipenv
98 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
99 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
100 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
101 | # install all needed dependencies.
102 | #Pipfile.lock
103 |
104 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
105 | __pypackages__/
106 |
107 | # Celery stuff
108 | celerybeat-schedule
109 | celerybeat.pid
110 |
111 | # SageMath parsed files
112 | *.sage.py
113 |
114 | # Environments
115 | .env
116 | .venv
117 | env/
118 | venv/
119 | ENV/
120 | env.bak/
121 | venv.bak/
122 |
123 | # Spyder project settings
124 | .spyderproject
125 | .spyproject
126 |
127 | # Rope project settings
128 | .ropeproject
129 |
130 | # mkdocs documentation
131 | /site
132 |
133 | # mypy
134 | .mypy_cache/
135 | .dmypy.json
136 | dmypy.json
137 |
138 | # Pyre type checker
139 | .pyre/
140 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | # See https://pre-commit.com for more information
3 | # See https://pre-commit.com/hooks.html for more hooks
4 | repos:
5 | - repo: https://github.com/pre-commit/pre-commit-hooks
6 | rev: v5.0.0
7 | hooks:
8 | - id: check-added-large-files
9 | - id: check-case-conflict
10 | - id: check-executables-have-shebangs
11 | - id: check-shebang-scripts-are-executable
12 | - id: check-symlinks
13 | - id: destroyed-symlinks
14 |
15 | - id: check-json
16 | - id: check-yaml
17 | - id: check-yaml
18 | - id: check-toml
19 |
20 | - id: check-merge-conflict
21 | - id: end-of-file-fixer
22 | - id: mixed-line-ending
23 | args: [--fix=lf]
24 | - id: trailing-whitespace
25 |
26 | - id: name-tests-test
27 |
28 | - repo: https://github.com/pre-commit/mirrors-prettier
29 | rev: v3.1.0
30 | hooks:
31 | - id: prettier
32 | files: \.(md|yml|yaml|json)$
33 | exclude: (\.github/release-please-manifest\.json|CHANGELOG\.md)$
34 |
35 | - repo: https://github.com/codespell-project/codespell
36 | rev: v2.3.0
37 | hooks:
38 | - id: codespell
39 | args: [--ignore-words=.codespellignore]
40 | exclude: poetry.lock$
41 |
42 | - repo: https://github.com/asottile/pyupgrade
43 | rev: v3.18.0
44 | hooks:
45 | - id: pyupgrade
46 | args: [--py38-plus]
47 |
48 | - repo: local
49 | hooks:
50 | - id: format
51 | name: format
52 | description: Format code
53 | entry: make format
54 | language: system
55 | pass_filenames: false
56 | always_run: true
57 |
58 | - id: lint
59 | name: lint
60 | description: Lint code
61 | entry: make lint
62 | language: system
63 | pass_filenames: false
64 | always_run: true
65 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## [0.11.2](https://github.com/jooola/gh-release-install/compare/v0.11.1...v0.11.2) (2024-08-11)
4 |
5 |
6 | ### Bug Fixes
7 |
8 | * **deps:** update dependency requests to >=2.32.3, <2.33 ([#178](https://github.com/jooola/gh-release-install/issues/178)) ([08f1d6a](https://github.com/jooola/gh-release-install/commit/08f1d6a8e11b5aa6f62e6058c692a5770640acaa))
9 |
10 | ## [0.11.1](https://github.com/jooola/gh-release-install/compare/v0.11.0...v0.11.1) (2023-12-18)
11 |
12 |
13 | ### Documentation
14 |
15 | * add support for python 3.12 ([e1f034b](https://github.com/jooola/gh-release-install/commit/e1f034b10609cf9c9df231cc328308a3de4e1ab8))
16 | * regenerate changelog ([a827693](https://github.com/jooola/gh-release-install/commit/a8276937d36006881b36b246463ece15df82fe53))
17 |
18 |
19 |
20 | ## [v0.11.0](https://github.com/jooola/gh-release-install/compare/v0.10.1...v0.11.0) (2023-05-30)
21 |
22 | ### :rocket: Features
23 |
24 | - drop python 3.7
25 |
26 |
27 |
28 | ## [v0.10.1](https://github.com/jooola/gh-release-install/compare/v0.10.0...v0.10.1) (2023-05-30)
29 |
30 |
31 |
32 | ## [v0.10.0](https://github.com/jooola/gh-release-install/compare/v0.9.0...v0.10.0) (2023-02-08)
33 |
34 | ### :bug: Bug Fixes
35 |
36 | - install when orphan version file is up to date
37 |
38 | ### :gear: CI/CD
39 |
40 | - use GITHUB_TOKEN to prevent rate limits ([#104](https://github.com/jooola/gh-release-install/issues/104))
41 | - use python 3.10 as stable version
42 | - test python3.11
43 |
44 |
45 |
46 | ## [v0.9.0](https://github.com/jooola/gh-release-install/compare/v0.8.0...v0.9.0) (2022-10-01)
47 |
48 | ### :bug: Bug Fixes
49 |
50 | - only export GhReleaseInstall
51 | - add docker entrypoint
52 | - reduce docker image size
53 |
54 | ### :rocket: Features
55 |
56 | - allow checksum verification
57 | - use python3-alpine variant
58 |
59 |
60 |
61 | ## [v0.8.0](https://github.com/jooola/gh-release-install/compare/v0.7.0...v0.8.0) (2022-09-17)
62 |
63 | ### :bug: Bug Fixes
64 |
65 | - allow older version of requests
66 | - reduce logging
67 | - verbosity forced to debug when enabled
68 |
69 | ### :gear: CI/CD
70 |
71 | - widen python dependencies range
72 | - run tests on examples
73 |
74 | ### :rocket: Features
75 |
76 | - replace click with argparse
77 |
78 |
79 |
80 | ## [v0.7.0](https://github.com/jooola/gh-release-install/compare/v0.6.2...v0.7.0) (2022-09-16)
81 |
82 | ### :rocket: Features
83 |
84 | - replace custom logger with logging
85 |
86 |
87 |
88 | ## [v0.6.2](https://github.com/jooola/gh-release-install/compare/v0.6.1...v0.6.2) (2022-07-20)
89 |
90 | ### :rocket: Features
91 |
92 | - create docker image
93 |
94 |
95 |
96 | ## [v0.6.1](https://github.com/jooola/gh-release-install/compare/v0.6.0...v0.6.1) (2022-07-10)
97 |
98 |
99 |
100 | ## [v0.6.0](https://github.com/jooola/gh-release-install/compare/v0.5.0...v0.6.0) (2022-07-10)
101 |
102 | ### :gear: CI/CD
103 |
104 | - use composite action
105 | - create virtualenvs in project
106 | - improve poetry caching
107 | - add python 3.10 testing
108 | - remove release drafter
109 |
110 | ### :rocket: Features
111 |
112 | - use GITHUB_TOKEN if present in env
113 | - drop python 3.6 support
114 |
115 |
116 |
117 | ## [v0.5.0](https://github.com/jooola/gh-release-install/compare/v0.4.2...v0.5.0) (2021-11-18)
118 |
119 | ### :gear: CI/CD
120 |
121 | - python matchers ([#19](https://github.com/jooola/gh-release-install/issues/19))
122 |
123 | ### :rocket: Features
124 |
125 | - add support for installing to directories ([#21](https://github.com/jooola/gh-release-install/issues/21))
126 |
127 |
128 |
129 | ## [v0.4.2](https://github.com/jooola/gh-release-install/compare/v0.4.1...v0.4.2) (2021-08-25)
130 |
131 | ### :gear: CI/CD
132 |
133 | - setup caching
134 | - publish at the end of workflow
135 |
136 |
137 |
138 | ## [v0.4.1](https://github.com/jooola/gh-release-install/compare/v0.4.0...v0.4.1) (2021-08-24)
139 |
140 | ### :gear: CI/CD
141 |
142 | - missing release drafter config
143 | - setup release drafter
144 |
145 | ### :rocket: Features
146 |
147 | - add support for bz2 compressed files ([#9](https://github.com/jooola/gh-release-install/issues/9))
148 |
149 |
150 |
151 | ## [v0.4.0](https://github.com/jooola/gh-release-install/compare/v0.3.2...v0.4.0) (2021-08-24)
152 |
153 |
154 |
155 | ## [v0.3.2](https://github.com/jooola/gh-release-install/compare/v0.3.1...v0.3.2) (2021-08-09)
156 |
157 | ### :bug: Bug Fixes
158 |
159 | - required python version missing 3.6
160 |
161 |
162 |
163 | ## [v0.3.1](https://github.com/jooola/gh-release-install/compare/v0.3.0...v0.3.1) (2021-08-09)
164 |
165 | ### :gear: CI/CD
166 |
167 | - add CI publish workflow
168 |
169 |
170 |
171 | ## [v0.3.0](https://github.com/jooola/gh-release-install/compare/v0.2.0...v0.3.0) (2021-08-09)
172 |
173 | ### :rocket: Features
174 |
175 | - add verbosity tweaking feature ([#5](https://github.com/jooola/gh-release-install/issues/5))
176 | - use shutils unpack_archive instead of custom logic
177 |
178 |
179 |
180 | ## v0.2.0 (2021-08-08)
181 |
182 | ### :bug: Bug Fixes
183 |
184 | - log levels in wrong order
185 |
186 | ### :gear: CI/CD
187 |
188 | - enhance CI
189 | - add basic CI
190 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-alpine as builder
2 |
3 | RUN python3 -m pip install --upgrade build
4 |
5 | COPY . .
6 |
7 | RUN python3 -m build
8 |
9 | FROM python:3.12-alpine
10 |
11 | ENV PYTHONDONTWRITEBYTECODE=1
12 | ENV PYTHONUNBUFFERED=1
13 |
14 | COPY --from=builder dist/gh_release_install*.whl .
15 | RUN pip --no-cache-dir install --no-compile gh_release_install*.whl \
16 | && rm gh_release_install*.whl
17 |
18 | ENTRYPOINT [ "/usr/local/bin/gh-release-install" ]
19 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: install format lint test e2e run-example
2 |
3 | SHELL = bash
4 | CPU_CORES = $$(( $(shell nproc) > 4 ? 4 : $(shell nproc) ))
5 |
6 | all: install format lint test
7 |
8 | install-poetry:
9 | curl -sSL https://install.python-poetry.org | python3 -
10 |
11 | export POETRY_VIRTUALENVS_IN_PROJECT = true
12 |
13 | install: .venv
14 | .venv:
15 | poetry install
16 |
17 | format: .venv
18 | poetry run black .
19 | poetry run isort .
20 |
21 | lint: .venv
22 | poetry run black . --diff --check
23 | poetry run pylint gh_release_install tests
24 | poetry run mypy gh_release_install tests
25 |
26 | test: .venv
27 | poetry run pytest -n $(CPU_CORES) --color=yes -v --cov=gh_release_install tests
28 |
29 | e2e: .venv
30 | poetry run pytest -n $(CPU_CORES) --color=yes -v --cov=gh_release_install e2e
31 |
32 | examples: .venv
33 | poetry run ./examples.sh
34 |
35 | ci-publish: .venv
36 | poetry publish --no-interaction --build
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Github release installer
2 |
3 | [](https://github.com/jooola/gh-release-install/actions/workflows/ci.yml)
4 | [](https://pypi.org/project/gh-release-install/)
5 | [](https://pypi.org/project/gh-release-install/)
6 |
7 | `gh-release-install` is a CLI helper to install Github releases on your system.
8 | It can be used for pretty much anything, to install a formatter in your CI, deploy
9 | some binary using an orcherstration tool, or on your desktop.
10 |
11 | This project was mainly created to...
12 |
13 | ```sh
14 | # ...turn this mess:
15 | wget --quiet --output-document=- "https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz" \
16 | | tar --extract --xz --directory=/usr/local/bin --strip-components=1 --wildcards 'shellcheck*/shellcheck' \
17 | && chmod +x /usr/local/bin/shellcheck
18 |
19 | wget --quiet --output-document=/usr/local/bin/shfmt "https://github.com/mvdan/sh/releases/download/v3.2.1/shfmt_v3.2.1_linux_amd64" \
20 | && chmod +x /usr/local/bin/shfmt
21 |
22 | # Into this:
23 | pip3 install gh-release-install
24 |
25 | gh-release-install \
26 | "koalaman/shellcheck" \
27 | "shellcheck-{tag}.linux.x86_64.tar.xz" --extract "shellcheck-{tag}/shellcheck" \
28 | "/usr/bin/shellcheck"
29 |
30 | gh-release-install \
31 | "mvdan/sh" \
32 | "shfmt_{tag}_linux_amd64" \
33 | "/usr/bin/shfmt"
34 | ```
35 |
36 | Features:
37 |
38 | - Download releases from Github.
39 | - Extract zip or tarball on the fly.
40 | - Pin to a desired version or get the `latest` version.
41 | - Keep track of the local tools version using a version file.
42 |
43 | ## Installation
44 |
45 | Install the package from pip:
46 |
47 | ```sh
48 | pip install gh-release-install
49 | gh-release-install --help
50 | ```
51 |
52 | Or with with pipx:
53 |
54 | ```sh
55 | pipx install gh-release-install
56 | gh-release-install --help
57 | ```
58 |
59 | ## Usage
60 |
61 | ```sh
62 | usage: gh-release-install [-h] [--extract ] [--version ]
63 | [--version-file ]
64 | [--checksum :] [-v] [-q]
65 | REPOSITORY ASSET DESTINATION
66 |
67 | Install GitHub release file on your system.
68 |
69 | positional arguments:
70 | REPOSITORY Github REPOSITORY org/repo to get the release from.
71 | ASSET Release ASSET filename. May contain variables such as
72 | '{version}' or '{tag}'.
73 | DESTINATION Path to save the downloaded file. If DESTINATION is a
74 | directory, the asset name will be used as filename in
75 | that directory. May contain variables such as
76 | '{version}' or '{tag}'.
77 |
78 | optional arguments:
79 | -h, --help show this help message and exit
80 | --extract Extract the from the release asset archive
81 | and install the extracted file instead. May contain
82 | variables such as '{version}' or '{tag}'. (default:
83 | None)
84 | --version Desired release version to install. When using 'latest'
85 | the installer will guess the latest version from the
86 | Github API. (default: latest)
87 | --version-file
88 | Track the version installed on the system using a file.
89 | May contain variables such as '{destination}'. (default:
90 | None)
91 | --checksum :
92 | Asset checksum used to verify the downloaded ASSET.
93 | can be one of md5, sha1, sha224, sha256, sha384,
94 | sha512. can either be the expected
95 | checksum, or the filename of an checksum file in the
96 | release assets. (default: None)
97 | -v, --verbose Increase the verbosity. (default: 0)
98 | -q, --quiet Disable logging. (default: None)
99 |
100 | template variables:
101 | {tag} Release tag name.
102 | {version} Release tag name without leading 'v'.
103 | {destination} DESTINATION path, including the asset filename if path
104 | is a directory.
105 |
106 | examples:
107 | gh-release-install 'mvdan/sh' \
108 | 'shfmt_{tag}_linux_amd64' \
109 | '/usr/local/bin/shfmt' \
110 | --version 'v3.3.1'
111 |
112 | gh-release-install 'prometheus/prometheus' \
113 | 'prometheus-{version}.linux-amd64.tar.gz' \
114 | --extract 'prometheus-{version}.linux-amd64/prometheus' \
115 | '/usr/local/bin/prometheus' \
116 | --version-file '{destination}.version' \
117 | --checksum 'sha256:sha256sums.txt'
118 |
119 | ```
120 |
--------------------------------------------------------------------------------
/e2e/install_test.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from pathlib import Path
4 | from subprocess import check_output
5 |
6 | import pytest
7 |
8 | from gh_release_install import GhReleaseInstall
9 |
10 | PARAMS_ARGS = "destination, checksum, kwargs, version_command, version_output"
11 | PARAMS = [
12 | pytest.param(
13 | "node_exporter",
14 | "sha256:sha256sums.txt",
15 | {
16 | "repository": "prometheus/node_exporter",
17 | "asset": "node_exporter-{version}.linux-amd64.tar.gz",
18 | "extract": "node_exporter-{version}.linux-amd64/node_exporter",
19 | "version": "v1.2.2",
20 | },
21 | "--version",
22 | "node_exporter, version 1.2.2 (branch: HEAD, revision: 26645363b486e12be40af7ce4fc91e731a33104e)\n"
23 | " build user: root@b9cb4aa2eb17\n"
24 | " build date: 20210806-13:44:18\n"
25 | " go version: go1.16.7\n"
26 | " platform: linux/amd64\n",
27 | id="prometheus/node_exporter",
28 | ),
29 | pytest.param(
30 | "shfmt",
31 | None,
32 | {
33 | "repository": "mvdan/sh",
34 | "asset": "shfmt_{tag}_linux_amd64",
35 | "version": "v3.3.1",
36 | },
37 | "-version",
38 | "v3.3.1\n",
39 | id="mvdan/sh",
40 | ),
41 | pytest.param(
42 | "loki",
43 | "sha256:SHA256SUMS",
44 | {
45 | "repository": "grafana/loki",
46 | "asset": "loki-linux-amd64.zip",
47 | "extract": "loki-linux-amd64",
48 | "version": "v2.2.1",
49 | },
50 | "-version",
51 | "loki, version 2.2.1 (branch: HEAD, revision: babea82e)\n"
52 | " build user: root@e2d295b84e26\n"
53 | " build date: 2021-04-06T00:52:41Z\n"
54 | " go version: go1.15.3\n"
55 | " platform: linux/amd64\n",
56 | id="grafana/loki",
57 | ),
58 | pytest.param(
59 | "restic",
60 | "sha256:SHA256SUMS",
61 | {
62 | "repository": "restic/restic",
63 | "asset": "restic_{version}_linux_amd64.bz2",
64 | "extract": "restic_{version}_linux_amd64",
65 | "version": "v0.12.1",
66 | },
67 | "version",
68 | "restic 0.12.1 compiled with go1.16.6 on linux/amd64\n",
69 | id="restic/restic",
70 | ),
71 | ]
72 |
73 |
74 | def get_version(destination_file: Path, version_command: str):
75 | return check_output([destination_file, version_command], text=True)
76 |
77 |
78 | @pytest.mark.parametrize(PARAMS_ARGS, PARAMS)
79 | def test_installer( # pylint: disable=unused-argument
80 | tmp_path: Path,
81 | destination,
82 | checksum,
83 | kwargs,
84 | version_command,
85 | version_output,
86 | ):
87 | destination_file = tmp_path / destination
88 |
89 | installer = GhReleaseInstall(destination=destination_file, **kwargs)
90 | installer.run()
91 |
92 | assert destination_file.exists()
93 | assert destination_file.is_file()
94 | assert get_version(destination_file, version_command) == version_output
95 |
96 |
97 | @pytest.mark.parametrize(PARAMS_ARGS, PARAMS)
98 | def test_installer_with_version_file(
99 | tmp_path: Path,
100 | destination,
101 | checksum,
102 | kwargs,
103 | version_command,
104 | version_output,
105 | ):
106 | kwargs["version_file"] = "{destination}.version"
107 |
108 | test_installer(
109 | tmp_path,
110 | destination,
111 | checksum,
112 | kwargs,
113 | version_command,
114 | version_output,
115 | )
116 |
117 | version_file = tmp_path / (destination + ".version")
118 | assert version_file.is_file()
119 | assert version_file.read_text() == kwargs["version"]
120 |
121 |
122 | @pytest.mark.parametrize(PARAMS_ARGS, PARAMS)
123 | def test_installer_to_dir( # pylint: disable=unused-argument
124 | tmp_path: Path,
125 | destination,
126 | checksum,
127 | kwargs,
128 | version_command,
129 | version_output,
130 | ):
131 | installer = GhReleaseInstall(destination=tmp_path, **kwargs)
132 | installer.run()
133 |
134 | assert installer.destination.exists()
135 | assert installer.destination.is_file()
136 | assert get_version(installer.destination, version_command) == version_output
137 |
138 |
139 | @pytest.mark.parametrize(PARAMS_ARGS, PARAMS)
140 | def test_installer_with_checksum(
141 | tmp_path: Path,
142 | destination,
143 | checksum,
144 | kwargs,
145 | version_command,
146 | version_output,
147 | ):
148 | if checksum is None:
149 | pytest.skip()
150 |
151 | kwargs["checksum"] = checksum
152 | test_installer(
153 | tmp_path,
154 | destination,
155 | checksum,
156 | kwargs,
157 | version_command,
158 | version_output,
159 | )
160 |
--------------------------------------------------------------------------------
/examples.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -eux
4 |
5 | error() {
6 | echo >&2 "error: $*"
7 | exit 1
8 | }
9 |
10 | command -v gh-release-install > /dev/null || error "gh-release-install command not found!"
11 |
12 | TMP_DIR=$(mktemp -d)
13 | pushd "$TMP_DIR"
14 |
15 | gh-release-install -vv \
16 | 'prometheus/node_exporter' \
17 | 'node_exporter-{version}.linux-amd64.tar.gz' \
18 | --extract 'node_exporter-{version}.linux-amd64/node_exporter' \
19 | "node_exporter" \
20 | --version 'v1.2.2' \
21 | --version-file '{destination}.version' \
22 | --checksum 'sha256:sha256sums.txt'
23 |
24 | gh-release-install -vv \
25 | 'mvdan/sh' \
26 | 'shfmt_{tag}_linux_amd64' \
27 | 'shfmt' \
28 | --version-file '{destination}.version'
29 |
30 | gh-release-install -vv \
31 | 'mvdan/sh' \
32 | 'shfmt_{tag}_linux_amd64' \
33 | 'shfmt' \
34 | --version 'v3.3.1' \
35 | --version-file '{destination}.version'
36 |
37 | gh-release-install -vv \
38 | 'mvdan/sh' \
39 | 'shfmt_{tag}_linux_amd64' \
40 | '.' \
41 | --version 'v3.3.1' \
42 | --version-file '{destination}.version'
43 |
44 | gh-release-install -vv \
45 | 'grafana/loki' \
46 | 'loki-linux-amd64.zip' \
47 | --extract 'loki-linux-amd64' \
48 | 'loki' \
49 | --version 'v2.2.1' \
50 | --checksum 'sha256:SHA256SUMS'
51 |
52 | gh-release-install -vv \
53 | 'grafana/loki' \
54 | 'loki-linux-amd64.zip' \
55 | --extract 'loki-linux-amd64' \
56 | 'loki' \
57 | --version 'v2.2.1' \
58 | --checksum 'sha256:dacfb229dbc7064b1d6390173ea6963eb3c85f60dc2336081b0113476405c5aa'
59 |
60 | gh-release-install -vv \
61 | 'restic/restic' \
62 | 'restic_{version}_linux_amd64.bz2' \
63 | --extract 'restic_{version}_linux_amd64' \
64 | 'restic' \
65 | --version 'v0.12.1' \
66 | --checksum 'sha256:SHA256SUMS'
67 |
68 | popd
69 | rm -Rf "$TMP_DIR"
70 |
--------------------------------------------------------------------------------
/gh_release_install/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from .main import GhReleaseInstall
4 |
--------------------------------------------------------------------------------
/gh_release_install/checksum.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import hashlib
4 | import logging
5 | import re
6 | from pathlib import Path
7 |
8 | __all__ = [
9 | "compute_file_checksum",
10 | "find_checksum_in_file",
11 | "HASH_ALGORITHM",
12 | "is_hexdigest",
13 | "parse_checksum_option",
14 | ]
15 |
16 | logger = logging.getLogger(__name__)
17 |
18 | HASH_ALGORITHM = ("md5", "sha1", "sha224", "sha256", "sha384", "sha512")
19 | HASH_ALGORITHM_LENGTH = {
20 | "md5": 32,
21 | "sha1": 40,
22 | "sha224": 56,
23 | "sha256": 64,
24 | "sha384": 96,
25 | "sha512": 128,
26 | }
27 |
28 |
29 | def parse_checksum_option(value: str) -> tuple[str, str]:
30 | try:
31 | algorithm, checksum = value.split(":", maxsplit=1)
32 | except ValueError as exception:
33 | raise ValueError(f"invalid checksum option {value}") from exception
34 |
35 | if algorithm not in HASH_ALGORITHM:
36 | raise ValueError(f"invalid checksum algorithm {algorithm}")
37 |
38 | return algorithm, checksum
39 |
40 |
41 | HEXDIGEST_RE = re.compile(r"^[0-9a-fA-F]+$")
42 |
43 |
44 | def is_hexdigest(algorithm: str, value: str) -> bool:
45 | return bool(
46 | len(value) == HASH_ALGORITHM_LENGTH[algorithm] and HEXDIGEST_RE.search(value)
47 | )
48 |
49 |
50 | def find_checksum_in_file(content: str, filename: str) -> str | None:
51 | lines = content.splitlines()
52 | for line in lines:
53 | match = re.search(r"^([0-9a-fA-F]+)\s+" + re.escape(filename) + r"$", line)
54 | if match is not None:
55 | return match.group(1)
56 |
57 | return None
58 |
59 |
60 | def compute_file_checksum(algorithm: str, filepath: Path) -> str:
61 | mixer = hashlib.new(algorithm, usedforsecurity=False)
62 |
63 | with filepath.open("rb") as file:
64 | while True:
65 | blob = file.read(8192)
66 | if not blob:
67 | break
68 | mixer.update(blob)
69 |
70 | digest = mixer.hexdigest()
71 | logger.debug("Computed %s digest '%s'", algorithm, digest)
72 |
73 | return digest
74 |
--------------------------------------------------------------------------------
/gh_release_install/cli.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import logging
4 | import sys
5 | from argparse import (
6 | ArgumentDefaultsHelpFormatter,
7 | ArgumentParser,
8 | RawDescriptionHelpFormatter,
9 | )
10 |
11 | from gh_release_install import GhReleaseInstall
12 | from gh_release_install.checksum import HASH_ALGORITHM
13 |
14 | logger = logging.getLogger(__name__)
15 |
16 |
17 | class ArgumentParserFormatter(
18 | RawDescriptionHelpFormatter,
19 | ArgumentDefaultsHelpFormatter,
20 | ):
21 | pass
22 |
23 |
24 | parser = ArgumentParser(
25 | description="Install GitHub release file on your system.",
26 | formatter_class=lambda prog: ArgumentParserFormatter(prog, width=80),
27 | )
28 | parser.add_argument(
29 | "repository",
30 | metavar="REPOSITORY",
31 | help="Github REPOSITORY org/repo to get the release from.",
32 | )
33 | parser.add_argument(
34 | "asset",
35 | metavar="ASSET",
36 | help="Release ASSET filename. May contain variables such as '{version}' or '{tag}'.",
37 | )
38 | parser.add_argument(
39 | "--extract",
40 | metavar="",
41 | help="""Extract the from the release asset archive and install the
42 | extracted file instead. May contain variables such as '{version}' or
43 | '{tag}'.""",
44 | )
45 | parser.add_argument(
46 | "destination",
47 | metavar="DESTINATION",
48 | help="""Path to save the downloaded file. If DESTINATION is a directory, the asset
49 | name will be used as filename in that directory. May contain variables such
50 | as '{version}' or '{tag}'.""",
51 | )
52 | parser.add_argument(
53 | "--version",
54 | default="latest",
55 | metavar="",
56 | help="""Desired release version to install. When using 'latest' the installer will
57 | guess the latest version from the Github API.""",
58 | )
59 | parser.add_argument(
60 | "--version-file",
61 | metavar="",
62 | help="""Track the version installed on the system using a file. May contain
63 | variables such as '{destination}'.""",
64 | )
65 | parser.add_argument(
66 | "--checksum",
67 | metavar=":",
68 | help=f"""Asset checksum used to verify the downloaded ASSET. can be one of
69 | {', '.join(HASH_ALGORITHM)}. can either be the expected
70 | checksum, or the filename of an checksum file in the release assets.""",
71 | )
72 | parser.add_argument(
73 | "-v",
74 | "--verbose",
75 | dest="verbosity",
76 | action="count",
77 | default=0,
78 | help="Increase the verbosity.",
79 | )
80 | parser.add_argument(
81 | "-q",
82 | "--quiet",
83 | dest="verbosity",
84 | action="store_const",
85 | const=-1,
86 | help="Disable logging.",
87 | )
88 | parser.epilog = """
89 | template variables:
90 | {tag} Release tag name.
91 | {version} Release tag name without leading 'v'.
92 | {destination} DESTINATION path, including the asset filename if path
93 | is a directory.
94 |
95 | examples:
96 | gh-release-install 'mvdan/sh' \\
97 | 'shfmt_{tag}_linux_amd64' \\
98 | '/usr/local/bin/shfmt' \\
99 | --version 'v3.3.1'
100 |
101 | gh-release-install 'prometheus/prometheus' \\
102 | 'prometheus-{version}.linux-amd64.tar.gz' \\
103 | --extract 'prometheus-{version}.linux-amd64/prometheus' \\
104 | '/usr/local/bin/prometheus' \\
105 | --version-file '{destination}.version' \\
106 | --checksum 'sha256:sha256sums.txt'
107 | """
108 |
109 |
110 | def run():
111 | args = parser.parse_args()
112 |
113 | if args.verbosity is not None and args.verbosity >= 0:
114 | levels = [logging.ERROR, logging.INFO, logging.DEBUG]
115 | logging.basicConfig(
116 | level=levels[min(args.verbosity, 2)],
117 | format="%(levelname)s:\t%(message)s",
118 | )
119 |
120 | installer = GhReleaseInstall(
121 | repository=args.repository,
122 | asset=args.asset,
123 | destination=args.destination,
124 | extract=args.extract,
125 | version=args.version,
126 | version_file=args.version_file,
127 | checksum=args.checksum,
128 | )
129 |
130 | try:
131 | installer.run()
132 | # pylint: disable=broad-except
133 | except Exception as exception:
134 | logger.exception(exception)
135 | sys.exit(1)
136 |
--------------------------------------------------------------------------------
/gh_release_install/main.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import logging
4 | import sys
5 | from os import environ
6 | from pathlib import Path
7 | from shutil import move, unpack_archive
8 | from tempfile import TemporaryDirectory
9 |
10 | from requests import Session
11 |
12 | from .checksum import (
13 | compute_file_checksum,
14 | find_checksum_in_file,
15 | is_hexdigest,
16 | parse_checksum_option,
17 | )
18 | from .unpack import register_unpack_formats
19 |
20 | __all__ = ["GhReleaseInstall"]
21 |
22 | LATEST = "latest"
23 |
24 | logger = logging.getLogger(__name__)
25 | logger.addHandler(logging.NullHandler())
26 |
27 |
28 | # pylint: disable=too-few-public-methods
29 | class Release:
30 | def __init__(self, tag: str) -> None:
31 | self.tag = tag
32 |
33 | @property
34 | def version(self) -> str:
35 | return self.tag.strip("v")
36 |
37 |
38 | def get_latest_tag(session: Session, repository: str) -> str:
39 | url = f"https://api.github.com/repos/{repository}/releases/latest"
40 | with session.get(url) as res:
41 | res.raise_for_status()
42 | body = res.json()
43 |
44 | return body["tag_name"]
45 |
46 |
47 | # pylint: disable=too-many-instance-attributes
48 | class GhReleaseInstall:
49 | _target: Release | None = None
50 | _local: Release | None = None
51 | _session: Session
52 |
53 | # pylint: disable=too-many-arguments
54 | def __init__(
55 | self,
56 | repository: str,
57 | asset: str,
58 | destination: str | Path,
59 | extract: str | None = None,
60 | version: str = LATEST,
61 | version_file: str | None = None,
62 | checksum: str | None = None,
63 | ):
64 | self._repository = repository
65 | self._asset = asset
66 | self._destination = str(destination)
67 | self._extract = extract
68 | self._version = version
69 | self._version_file = version_file
70 |
71 | self.checksum_algorithm, self.checksum = None, None
72 | if checksum is not None:
73 | self.checksum_algorithm, self.checksum = parse_checksum_option(checksum)
74 |
75 | self._session = Session()
76 | if "GITHUB_TOKEN" in environ:
77 | logger.debug("Loading GITHUB_TOKEN from env")
78 | github_token = environ.get("GITHUB_TOKEN")
79 | self._session.headers.update({"Authorization": f"token {github_token}"})
80 |
81 | register_unpack_formats()
82 |
83 | def _resolve_path(self, path: str, **variables: str) -> str:
84 | if self._target is not None:
85 | variables["tag"] = self._target.tag
86 | variables["version"] = self._target.version
87 |
88 | return path.format(**variables)
89 |
90 | @property
91 | def asset(self) -> str:
92 | return self._resolve_path(self._asset)
93 |
94 | @property
95 | def destination(self) -> Path:
96 | destination = Path(self._resolve_path(self._destination))
97 |
98 | if destination.is_dir():
99 | return destination / self.asset
100 |
101 | return destination
102 |
103 | @property
104 | def extract(self) -> str | None:
105 | if self._extract is None:
106 | return None
107 | return self._resolve_path(self._extract)
108 |
109 | @property
110 | def version_file(self) -> Path | None:
111 | if self._version_file is None:
112 | return None
113 |
114 | return Path(
115 | self._resolve_path(
116 | self._version_file,
117 | destination=str(self.destination),
118 | )
119 | )
120 |
121 | def _github_asset_url(self, asset: str) -> str:
122 | assert self._target is not None
123 | return f"https://github.com/{self._repository}/releases/download/{self._target.tag}/{asset}"
124 |
125 | def _get_target_version(self):
126 | """
127 | If not provided, get latest tag/version from the Github repository.
128 | """
129 | if self._version == LATEST:
130 | self._target = Release(get_latest_tag(self._session, self._repository))
131 | else:
132 | self._target = Release(self._version)
133 |
134 | logger.debug("Target version is '%s'", self._target.version)
135 |
136 | def _get_local_version(self):
137 | """
138 | Get local tag / version from possible version file.
139 | """
140 | if self.version_file is not None and self.version_file.is_file():
141 | self._local = Release(self.version_file.read_text(encoding="utf-8"))
142 | logger.debug("Local version is '%s'", self._local.version)
143 |
144 | def _get_checksum_from_url(self, url: str) -> str | None:
145 | """
146 | Download checksum file from the provided url and extract the checksum.
147 | """
148 | with self._session.get(url) as res:
149 | if res.status_code == 404:
150 | return None
151 | res.raise_for_status()
152 |
153 | return find_checksum_in_file(res.text, self.asset)
154 |
155 | def _verify_checksum(self, asset_file: Path) -> bool:
156 | """
157 | Verify asset checksum, first check against a possible hand written digest,
158 | then check against a digest from a asset checksum file.
159 | """
160 | assert self.checksum is not None
161 | assert self.checksum_algorithm is not None
162 |
163 | local_checksum = compute_file_checksum(self.checksum_algorithm, asset_file)
164 |
165 | # We hope nobody will ever pass a asset filename that matches this check
166 | if is_hexdigest(self.checksum_algorithm, self.checksum):
167 | return local_checksum == self.checksum
168 |
169 | target_checksum_url = self._github_asset_url(self.checksum)
170 | target_checksum = self._get_checksum_from_url(target_checksum_url)
171 | return local_checksum == target_checksum
172 |
173 | def _download_release_asset(self, tmp_dir: Path):
174 | """
175 | Download target version release file in a temporary file.
176 | """
177 | url = self._github_asset_url(self.asset)
178 | with self._session.get(url, stream=True) as res:
179 | res.raise_for_status()
180 | tmp_file = tmp_dir / self.asset
181 |
182 | logger.debug("Saving asset to '%s'", tmp_file)
183 | with tmp_file.open("wb") as tmp_fd:
184 | for chunk in res.iter_content(chunk_size=2048):
185 | tmp_fd.write(chunk)
186 |
187 | return tmp_file
188 |
189 | def _extract_release_asset(self, tmp_dir: Path, asset_file: Path) -> Path:
190 | """
191 | Extract downloaded release archive.
192 | """
193 | unpack_archive(asset_file, tmp_dir)
194 | assert self.extract is not None
195 | return tmp_dir / self.extract
196 |
197 | def run(self):
198 | self._get_target_version()
199 | self._get_local_version()
200 |
201 | if self._local is not None:
202 | if not self.destination.is_file():
203 | logger.warning(
204 | "Local version is referring to an inexistent asset '%s'",
205 | self.destination,
206 | )
207 | elif self._target.version == self._local.version:
208 | logger.info("Target version is already installed")
209 | sys.exit(0)
210 |
211 | with TemporaryDirectory(prefix="gh-release-installer") as tmp_dir:
212 | tmp_dir = Path(tmp_dir)
213 | asset_file = self._download_release_asset(tmp_dir)
214 |
215 | if self.checksum is not None:
216 | if not self._verify_checksum(asset_file):
217 | logger.error("Checksum verification failed")
218 | sys.exit(1)
219 | logger.info("Checksum verification succeeded")
220 |
221 | if self.extract is not None:
222 | asset_file = self._extract_release_asset(tmp_dir, asset_file)
223 | logger.info("Extracted archive to '%s'", asset_file)
224 |
225 | move(asset_file, self.destination)
226 | self.destination.chmod(0o755)
227 | logger.info("Installed file to '%s'", self.destination)
228 |
229 | # Save to local tag/version file
230 | if self.version_file is not None:
231 | self.version_file.write_text(self._target.tag, encoding="utf-8")
232 | logger.info("Saved version file to '%s'", self.version_file)
233 |
--------------------------------------------------------------------------------
/gh_release_install/unpack.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import bz2
4 | import logging
5 | from pathlib import Path
6 | from shutil import get_unpack_formats, register_unpack_format
7 |
8 | logger = logging.getLogger(__name__)
9 |
10 |
11 | def _unpack_bz2(filename, extract_dir):
12 | filename = Path(filename)
13 | extract_dir = Path(extract_dir)
14 |
15 | extracted = extract_dir / filename.stem
16 |
17 | with filename.open("rb") as filename_fd:
18 | with extracted.open("wb") as extracted_fd:
19 | extracted_fd.write(bz2.decompress(filename_fd.read()))
20 |
21 |
22 | def register_unpack_formats():
23 | """Register custom unpack formats."""
24 | logger.debug("Registering custom unpack formats")
25 |
26 | formats = get_unpack_formats()
27 | if "bz2" not in map(lambda x: x[0], formats):
28 | register_unpack_format("bz2", [".bz2"], _unpack_bz2, description="bz2 files")
29 |
30 | logger.debug("Unpack formats available: %s", formats)
31 |
--------------------------------------------------------------------------------
/poetry.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand.
2 |
3 | [[package]]
4 | name = "astroid"
5 | version = "3.2.4"
6 | description = "An abstract syntax tree for Python with inference support."
7 | optional = false
8 | python-versions = ">=3.8.0"
9 | files = [
10 | {file = "astroid-3.2.4-py3-none-any.whl", hash = "sha256:413658a61eeca6202a59231abb473f932038fbcbf1666587f66d482083413a25"},
11 | {file = "astroid-3.2.4.tar.gz", hash = "sha256:0e14202810b30da1b735827f78f5157be2bbd4a7a59b7707ca0bfc2fb4c0063a"},
12 | ]
13 |
14 | [package.dependencies]
15 | typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""}
16 |
17 | [[package]]
18 | name = "black"
19 | version = "24.8.0"
20 | description = "The uncompromising code formatter."
21 | optional = false
22 | python-versions = ">=3.8"
23 | files = [
24 | {file = "black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6"},
25 | {file = "black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb"},
26 | {file = "black-24.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42"},
27 | {file = "black-24.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a"},
28 | {file = "black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1"},
29 | {file = "black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af"},
30 | {file = "black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4"},
31 | {file = "black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af"},
32 | {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"},
33 | {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"},
34 | {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"},
35 | {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"},
36 | {file = "black-24.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd"},
37 | {file = "black-24.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2"},
38 | {file = "black-24.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e"},
39 | {file = "black-24.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920"},
40 | {file = "black-24.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c"},
41 | {file = "black-24.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e"},
42 | {file = "black-24.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47"},
43 | {file = "black-24.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb"},
44 | {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"},
45 | {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"},
46 | ]
47 |
48 | [package.dependencies]
49 | click = ">=8.0.0"
50 | mypy-extensions = ">=0.4.3"
51 | packaging = ">=22.0"
52 | pathspec = ">=0.9.0"
53 | platformdirs = ">=2"
54 | tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
55 | typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""}
56 |
57 | [package.extras]
58 | colorama = ["colorama (>=0.4.3)"]
59 | d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"]
60 | jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
61 | uvloop = ["uvloop (>=0.15.2)"]
62 |
63 | [[package]]
64 | name = "certifi"
65 | version = "2024.12.14"
66 | description = "Python package for providing Mozilla's CA Bundle."
67 | optional = false
68 | python-versions = ">=3.6"
69 | files = [
70 | {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"},
71 | {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"},
72 | ]
73 |
74 | [[package]]
75 | name = "charset-normalizer"
76 | version = "3.4.1"
77 | description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
78 | optional = false
79 | python-versions = ">=3.7"
80 | files = [
81 | {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"},
82 | {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"},
83 | {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"},
84 | {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"},
85 | {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"},
86 | {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"},
87 | {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"},
88 | {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"},
89 | {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"},
90 | {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"},
91 | {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"},
92 | {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"},
93 | {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"},
94 | {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"},
95 | {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"},
96 | {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"},
97 | {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"},
98 | {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"},
99 | {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"},
100 | {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"},
101 | {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"},
102 | {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"},
103 | {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"},
104 | {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"},
105 | {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"},
106 | {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"},
107 | {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"},
108 | {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"},
109 | {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"},
110 | {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"},
111 | {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"},
112 | {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"},
113 | {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"},
114 | {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"},
115 | {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"},
116 | {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"},
117 | {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"},
118 | {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"},
119 | {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"},
120 | {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"},
121 | {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"},
122 | {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"},
123 | {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"},
124 | {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"},
125 | {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"},
126 | {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"},
127 | {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"},
128 | {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"},
129 | {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"},
130 | {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"},
131 | {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"},
132 | {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"},
133 | {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"},
134 | {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"},
135 | {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"},
136 | {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"},
137 | {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"},
138 | {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"},
139 | {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"},
140 | {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"},
141 | {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"},
142 | {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"},
143 | {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"},
144 | {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"},
145 | {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"},
146 | {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"},
147 | {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"},
148 | {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"},
149 | {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"},
150 | {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"},
151 | {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"},
152 | {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"},
153 | {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"},
154 | {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"},
155 | {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"},
156 | {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"},
157 | {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"},
158 | {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"},
159 | {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"},
160 | {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"},
161 | {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"},
162 | {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"},
163 | {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"},
164 | {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"},
165 | {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"},
166 | {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"},
167 | {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"},
168 | {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"},
169 | {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"},
170 | {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"},
171 | {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"},
172 | {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"},
173 | ]
174 |
175 | [[package]]
176 | name = "click"
177 | version = "8.1.8"
178 | description = "Composable command line interface toolkit"
179 | optional = false
180 | python-versions = ">=3.7"
181 | files = [
182 | {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"},
183 | {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"},
184 | ]
185 |
186 | [package.dependencies]
187 | colorama = {version = "*", markers = "platform_system == \"Windows\""}
188 |
189 | [[package]]
190 | name = "colorama"
191 | version = "0.4.6"
192 | description = "Cross-platform colored terminal text."
193 | optional = false
194 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
195 | files = [
196 | {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
197 | {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
198 | ]
199 |
200 | [[package]]
201 | name = "coverage"
202 | version = "7.6.1"
203 | description = "Code coverage measurement for Python"
204 | optional = false
205 | python-versions = ">=3.8"
206 | files = [
207 | {file = "coverage-7.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b06079abebbc0e89e6163b8e8f0e16270124c154dc6e4a47b413dd538859af16"},
208 | {file = "coverage-7.6.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf4b19715bccd7ee27b6b120e7e9dd56037b9c0681dcc1adc9ba9db3d417fa36"},
209 | {file = "coverage-7.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61c0abb4c85b095a784ef23fdd4aede7a2628478e7baba7c5e3deba61070a02"},
210 | {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd21f6ae3f08b41004dfb433fa895d858f3f5979e7762d052b12aef444e29afc"},
211 | {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f59d57baca39b32db42b83b2a7ba6f47ad9c394ec2076b084c3f029b7afca23"},
212 | {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a1ac0ae2b8bd743b88ed0502544847c3053d7171a3cff9228af618a068ed9c34"},
213 | {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e6a08c0be454c3b3beb105c0596ebdc2371fab6bb90c0c0297f4e58fd7e1012c"},
214 | {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f5796e664fe802da4f57a168c85359a8fbf3eab5e55cd4e4569fbacecc903959"},
215 | {file = "coverage-7.6.1-cp310-cp310-win32.whl", hash = "sha256:7bb65125fcbef8d989fa1dd0e8a060999497629ca5b0efbca209588a73356232"},
216 | {file = "coverage-7.6.1-cp310-cp310-win_amd64.whl", hash = "sha256:3115a95daa9bdba70aea750db7b96b37259a81a709223c8448fa97727d546fe0"},
217 | {file = "coverage-7.6.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7dea0889685db8550f839fa202744652e87c60015029ce3f60e006f8c4462c93"},
218 | {file = "coverage-7.6.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed37bd3c3b063412f7620464a9ac1314d33100329f39799255fb8d3027da50d3"},
219 | {file = "coverage-7.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d85f5e9a5f8b73e2350097c3756ef7e785f55bd71205defa0bfdaf96c31616ff"},
220 | {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bc572be474cafb617672c43fe989d6e48d3c83af02ce8de73fff1c6bb3c198d"},
221 | {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0420b573964c760df9e9e86d1a9a622d0d27f417e1a949a8a66dd7bcee7bc6"},
222 | {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1f4aa8219db826ce6be7099d559f8ec311549bfc4046f7f9fe9b5cea5c581c56"},
223 | {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:fc5a77d0c516700ebad189b587de289a20a78324bc54baee03dd486f0855d234"},
224 | {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b48f312cca9621272ae49008c7f613337c53fadca647d6384cc129d2996d1133"},
225 | {file = "coverage-7.6.1-cp311-cp311-win32.whl", hash = "sha256:1125ca0e5fd475cbbba3bb67ae20bd2c23a98fac4e32412883f9bcbaa81c314c"},
226 | {file = "coverage-7.6.1-cp311-cp311-win_amd64.whl", hash = "sha256:8ae539519c4c040c5ffd0632784e21b2f03fc1340752af711f33e5be83a9d6c6"},
227 | {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"},
228 | {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"},
229 | {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"},
230 | {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"},
231 | {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"},
232 | {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"},
233 | {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"},
234 | {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"},
235 | {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"},
236 | {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"},
237 | {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"},
238 | {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"},
239 | {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"},
240 | {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"},
241 | {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"},
242 | {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"},
243 | {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"},
244 | {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"},
245 | {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"},
246 | {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"},
247 | {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"},
248 | {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"},
249 | {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"},
250 | {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"},
251 | {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"},
252 | {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"},
253 | {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"},
254 | {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"},
255 | {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"},
256 | {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"},
257 | {file = "coverage-7.6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6db04803b6c7291985a761004e9060b2bca08da6d04f26a7f2294b8623a0c1a0"},
258 | {file = "coverage-7.6.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f1adfc8ac319e1a348af294106bc6a8458a0f1633cc62a1446aebc30c5fa186a"},
259 | {file = "coverage-7.6.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a95324a9de9650a729239daea117df21f4b9868ce32e63f8b650ebe6cef5595b"},
260 | {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b43c03669dc4618ec25270b06ecd3ee4fa94c7f9b3c14bae6571ca00ef98b0d3"},
261 | {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8929543a7192c13d177b770008bc4e8119f2e1f881d563fc6b6305d2d0ebe9de"},
262 | {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:a09ece4a69cf399510c8ab25e0950d9cf2b42f7b3cb0374f95d2e2ff594478a6"},
263 | {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9054a0754de38d9dbd01a46621636689124d666bad1936d76c0341f7d71bf569"},
264 | {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0dbde0f4aa9a16fa4d754356a8f2e36296ff4d83994b2c9d8398aa32f222f989"},
265 | {file = "coverage-7.6.1-cp38-cp38-win32.whl", hash = "sha256:da511e6ad4f7323ee5702e6633085fb76c2f893aaf8ce4c51a0ba4fc07580ea7"},
266 | {file = "coverage-7.6.1-cp38-cp38-win_amd64.whl", hash = "sha256:3f1156e3e8f2872197af3840d8ad307a9dd18e615dc64d9ee41696f287c57ad8"},
267 | {file = "coverage-7.6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abd5fd0db5f4dc9289408aaf34908072f805ff7792632250dcb36dc591d24255"},
268 | {file = "coverage-7.6.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:547f45fa1a93154bd82050a7f3cddbc1a7a4dd2a9bf5cb7d06f4ae29fe94eaf8"},
269 | {file = "coverage-7.6.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645786266c8f18a931b65bfcefdbf6952dd0dea98feee39bd188607a9d307ed2"},
270 | {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e0b2df163b8ed01d515807af24f63de04bebcecbd6c3bfeff88385789fdf75a"},
271 | {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:609b06f178fe8e9f89ef676532760ec0b4deea15e9969bf754b37f7c40326dbc"},
272 | {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:702855feff378050ae4f741045e19a32d57d19f3e0676d589df0575008ea5004"},
273 | {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2bdb062ea438f22d99cba0d7829c2ef0af1d768d1e4a4f528087224c90b132cb"},
274 | {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9c56863d44bd1c4fe2abb8a4d6f5371d197f1ac0ebdee542f07f35895fc07f36"},
275 | {file = "coverage-7.6.1-cp39-cp39-win32.whl", hash = "sha256:6e2cd258d7d927d09493c8df1ce9174ad01b381d4729a9d8d4e38670ca24774c"},
276 | {file = "coverage-7.6.1-cp39-cp39-win_amd64.whl", hash = "sha256:06a737c882bd26d0d6ee7269b20b12f14a8704807a01056c80bb881a4b2ce6ca"},
277 | {file = "coverage-7.6.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:e9a6e0eb86070e8ccaedfbd9d38fec54864f3125ab95419970575b42af7541df"},
278 | {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"},
279 | ]
280 |
281 | [package.dependencies]
282 | tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
283 |
284 | [package.extras]
285 | toml = ["tomli"]
286 |
287 | [[package]]
288 | name = "dill"
289 | version = "0.3.9"
290 | description = "serialize all of Python"
291 | optional = false
292 | python-versions = ">=3.8"
293 | files = [
294 | {file = "dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a"},
295 | {file = "dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"},
296 | ]
297 |
298 | [package.extras]
299 | graph = ["objgraph (>=1.7.2)"]
300 | profile = ["gprof2dot (>=2022.7.29)"]
301 |
302 | [[package]]
303 | name = "exceptiongroup"
304 | version = "1.2.2"
305 | description = "Backport of PEP 654 (exception groups)"
306 | optional = false
307 | python-versions = ">=3.7"
308 | files = [
309 | {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"},
310 | {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"},
311 | ]
312 |
313 | [package.extras]
314 | test = ["pytest (>=6)"]
315 |
316 | [[package]]
317 | name = "execnet"
318 | version = "2.1.1"
319 | description = "execnet: rapid multi-Python deployment"
320 | optional = false
321 | python-versions = ">=3.8"
322 | files = [
323 | {file = "execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc"},
324 | {file = "execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3"},
325 | ]
326 |
327 | [package.extras]
328 | testing = ["hatch", "pre-commit", "pytest", "tox"]
329 |
330 | [[package]]
331 | name = "idna"
332 | version = "3.10"
333 | description = "Internationalized Domain Names in Applications (IDNA)"
334 | optional = false
335 | python-versions = ">=3.6"
336 | files = [
337 | {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"},
338 | {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"},
339 | ]
340 |
341 | [package.extras]
342 | all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"]
343 |
344 | [[package]]
345 | name = "iniconfig"
346 | version = "2.0.0"
347 | description = "brain-dead simple config-ini parsing"
348 | optional = false
349 | python-versions = ">=3.7"
350 | files = [
351 | {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"},
352 | {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
353 | ]
354 |
355 | [[package]]
356 | name = "isort"
357 | version = "5.13.2"
358 | description = "A Python utility / library to sort Python imports."
359 | optional = false
360 | python-versions = ">=3.8.0"
361 | files = [
362 | {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"},
363 | {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"},
364 | ]
365 |
366 | [package.extras]
367 | colors = ["colorama (>=0.4.6)"]
368 |
369 | [[package]]
370 | name = "mccabe"
371 | version = "0.7.0"
372 | description = "McCabe checker, plugin for flake8"
373 | optional = false
374 | python-versions = ">=3.6"
375 | files = [
376 | {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
377 | {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
378 | ]
379 |
380 | [[package]]
381 | name = "mypy"
382 | version = "1.14.1"
383 | description = "Optional static typing for Python"
384 | optional = false
385 | python-versions = ">=3.8"
386 | files = [
387 | {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"},
388 | {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"},
389 | {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90716d8b2d1f4cd503309788e51366f07c56635a3309b0f6a32547eaaa36a64d"},
390 | {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ae753f5c9fef278bcf12e1a564351764f2a6da579d4a81347e1d5a15819997b"},
391 | {file = "mypy-1.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e0fe0f5feaafcb04505bcf439e991c6d8f1bf8b15f12b05feeed96e9e7bf1427"},
392 | {file = "mypy-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d54bd85b925e501c555a3227f3ec0cfc54ee8b6930bd6141ec872d1c572f81f"},
393 | {file = "mypy-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f995e511de847791c3b11ed90084a7a0aafdc074ab88c5a9711622fe4751138c"},
394 | {file = "mypy-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d64169ec3b8461311f8ce2fd2eb5d33e2d0f2c7b49116259c51d0d96edee48d1"},
395 | {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba24549de7b89b6381b91fbc068d798192b1b5201987070319889e93038967a8"},
396 | {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:183cf0a45457d28ff9d758730cd0210419ac27d4d3f285beda038c9083363b1f"},
397 | {file = "mypy-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f2a0ecc86378f45347f586e4163d1769dd81c5a223d577fe351f26b179e148b1"},
398 | {file = "mypy-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:ad3301ebebec9e8ee7135d8e3109ca76c23752bac1e717bc84cd3836b4bf3eae"},
399 | {file = "mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14"},
400 | {file = "mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9"},
401 | {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11"},
402 | {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e"},
403 | {file = "mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89"},
404 | {file = "mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b"},
405 | {file = "mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255"},
406 | {file = "mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34"},
407 | {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a"},
408 | {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9"},
409 | {file = "mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd"},
410 | {file = "mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107"},
411 | {file = "mypy-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7084fb8f1128c76cd9cf68fe5971b37072598e7c31b2f9f95586b65c741a9d31"},
412 | {file = "mypy-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f845a00b4f420f693f870eaee5f3e2692fa84cc8514496114649cfa8fd5e2c6"},
413 | {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44bf464499f0e3a2d14d58b54674dee25c031703b2ffc35064bd0df2e0fac319"},
414 | {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c99f27732c0b7dc847adb21c9d47ce57eb48fa33a17bc6d7d5c5e9f9e7ae5bac"},
415 | {file = "mypy-1.14.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:bce23c7377b43602baa0bd22ea3265c49b9ff0b76eb315d6c34721af4cdf1d9b"},
416 | {file = "mypy-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:8edc07eeade7ebc771ff9cf6b211b9a7d93687ff892150cb5692e4f4272b0837"},
417 | {file = "mypy-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3888a1816d69f7ab92092f785a462944b3ca16d7c470d564165fe703b0970c35"},
418 | {file = "mypy-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46c756a444117c43ee984bd055db99e498bc613a70bbbc120272bd13ca579fbc"},
419 | {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27fc248022907e72abfd8e22ab1f10e903915ff69961174784a3900a8cba9ad9"},
420 | {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:499d6a72fb7e5de92218db961f1a66d5f11783f9ae549d214617edab5d4dbdbb"},
421 | {file = "mypy-1.14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57961db9795eb566dc1d1b4e9139ebc4c6b0cb6e7254ecde69d1552bf7613f60"},
422 | {file = "mypy-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:07ba89fdcc9451f2ebb02853deb6aaaa3d2239a236669a63ab3801bbf923ef5c"},
423 | {file = "mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1"},
424 | {file = "mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6"},
425 | ]
426 |
427 | [package.dependencies]
428 | mypy_extensions = ">=1.0.0"
429 | tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
430 | typing_extensions = ">=4.6.0"
431 |
432 | [package.extras]
433 | dmypy = ["psutil (>=4.0)"]
434 | faster-cache = ["orjson"]
435 | install-types = ["pip"]
436 | mypyc = ["setuptools (>=50)"]
437 | reports = ["lxml"]
438 |
439 | [[package]]
440 | name = "mypy-extensions"
441 | version = "1.0.0"
442 | description = "Type system extensions for programs checked with the mypy type checker."
443 | optional = false
444 | python-versions = ">=3.5"
445 | files = [
446 | {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
447 | {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
448 | ]
449 |
450 | [[package]]
451 | name = "packaging"
452 | version = "24.2"
453 | description = "Core utilities for Python packages"
454 | optional = false
455 | python-versions = ">=3.8"
456 | files = [
457 | {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"},
458 | {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"},
459 | ]
460 |
461 | [[package]]
462 | name = "pathspec"
463 | version = "0.12.1"
464 | description = "Utility library for gitignore style pattern matching of file paths."
465 | optional = false
466 | python-versions = ">=3.8"
467 | files = [
468 | {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"},
469 | {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"},
470 | ]
471 |
472 | [[package]]
473 | name = "platformdirs"
474 | version = "4.3.6"
475 | description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`."
476 | optional = false
477 | python-versions = ">=3.8"
478 | files = [
479 | {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"},
480 | {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"},
481 | ]
482 |
483 | [package.extras]
484 | docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"]
485 | test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"]
486 | type = ["mypy (>=1.11.2)"]
487 |
488 | [[package]]
489 | name = "pluggy"
490 | version = "1.5.0"
491 | description = "plugin and hook calling mechanisms for python"
492 | optional = false
493 | python-versions = ">=3.8"
494 | files = [
495 | {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"},
496 | {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"},
497 | ]
498 |
499 | [package.extras]
500 | dev = ["pre-commit", "tox"]
501 | testing = ["pytest", "pytest-benchmark"]
502 |
503 | [[package]]
504 | name = "pylint"
505 | version = "3.2.7"
506 | description = "python code static checker"
507 | optional = false
508 | python-versions = ">=3.8.0"
509 | files = [
510 | {file = "pylint-3.2.7-py3-none-any.whl", hash = "sha256:02f4aedeac91be69fb3b4bea997ce580a4ac68ce58b89eaefeaf06749df73f4b"},
511 | {file = "pylint-3.2.7.tar.gz", hash = "sha256:1b7a721b575eaeaa7d39db076b6e7743c993ea44f57979127c517c6c572c803e"},
512 | ]
513 |
514 | [package.dependencies]
515 | astroid = ">=3.2.4,<=3.3.0-dev0"
516 | colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
517 | dill = [
518 | {version = ">=0.2", markers = "python_version < \"3.11\""},
519 | {version = ">=0.3.7", markers = "python_version >= \"3.12\""},
520 | {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""},
521 | ]
522 | isort = ">=4.2.5,<5.13.0 || >5.13.0,<6"
523 | mccabe = ">=0.6,<0.8"
524 | platformdirs = ">=2.2.0"
525 | tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
526 | tomlkit = ">=0.10.1"
527 | typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""}
528 |
529 | [package.extras]
530 | spelling = ["pyenchant (>=3.2,<4.0)"]
531 | testutils = ["gitpython (>3)"]
532 |
533 | [[package]]
534 | name = "pytest"
535 | version = "8.3.4"
536 | description = "pytest: simple powerful testing with Python"
537 | optional = false
538 | python-versions = ">=3.8"
539 | files = [
540 | {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"},
541 | {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"},
542 | ]
543 |
544 | [package.dependencies]
545 | colorama = {version = "*", markers = "sys_platform == \"win32\""}
546 | exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
547 | iniconfig = "*"
548 | packaging = "*"
549 | pluggy = ">=1.5,<2"
550 | tomli = {version = ">=1", markers = "python_version < \"3.11\""}
551 |
552 | [package.extras]
553 | dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
554 |
555 | [[package]]
556 | name = "pytest-cov"
557 | version = "5.0.0"
558 | description = "Pytest plugin for measuring coverage."
559 | optional = false
560 | python-versions = ">=3.8"
561 | files = [
562 | {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"},
563 | {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"},
564 | ]
565 |
566 | [package.dependencies]
567 | coverage = {version = ">=5.2.1", extras = ["toml"]}
568 | pytest = ">=4.6"
569 |
570 | [package.extras]
571 | testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"]
572 |
573 | [[package]]
574 | name = "pytest-xdist"
575 | version = "3.6.1"
576 | description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs"
577 | optional = false
578 | python-versions = ">=3.8"
579 | files = [
580 | {file = "pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7"},
581 | {file = "pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d"},
582 | ]
583 |
584 | [package.dependencies]
585 | execnet = ">=2.1"
586 | pytest = ">=7.0.0"
587 |
588 | [package.extras]
589 | psutil = ["psutil (>=3.0)"]
590 | setproctitle = ["setproctitle"]
591 | testing = ["filelock"]
592 |
593 | [[package]]
594 | name = "requests"
595 | version = "2.32.3"
596 | description = "Python HTTP for Humans."
597 | optional = false
598 | python-versions = ">=3.8"
599 | files = [
600 | {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"},
601 | {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"},
602 | ]
603 |
604 | [package.dependencies]
605 | certifi = ">=2017.4.17"
606 | charset-normalizer = ">=2,<4"
607 | idna = ">=2.5,<4"
608 | urllib3 = ">=1.21.1,<3"
609 |
610 | [package.extras]
611 | socks = ["PySocks (>=1.5.6,!=1.5.7)"]
612 | use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
613 |
614 | [[package]]
615 | name = "requests-mock"
616 | version = "1.12.1"
617 | description = "Mock out responses from the requests package"
618 | optional = false
619 | python-versions = ">=3.5"
620 | files = [
621 | {file = "requests-mock-1.12.1.tar.gz", hash = "sha256:e9e12e333b525156e82a3c852f22016b9158220d2f47454de9cae8a77d371401"},
622 | {file = "requests_mock-1.12.1-py2.py3-none-any.whl", hash = "sha256:b1e37054004cdd5e56c84454cc7df12b25f90f382159087f4b6915aaeef39563"},
623 | ]
624 |
625 | [package.dependencies]
626 | requests = ">=2.22,<3"
627 |
628 | [package.extras]
629 | fixture = ["fixtures"]
630 |
631 | [[package]]
632 | name = "tomli"
633 | version = "2.2.1"
634 | description = "A lil' TOML parser"
635 | optional = false
636 | python-versions = ">=3.8"
637 | files = [
638 | {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"},
639 | {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},
640 | {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"},
641 | {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"},
642 | {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"},
643 | {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"},
644 | {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"},
645 | {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"},
646 | {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"},
647 | {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"},
648 | {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"},
649 | {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"},
650 | {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"},
651 | {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"},
652 | {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"},
653 | {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"},
654 | {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"},
655 | {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"},
656 | {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"},
657 | {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"},
658 | {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"},
659 | {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"},
660 | {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"},
661 | {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"},
662 | {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"},
663 | {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"},
664 | {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"},
665 | {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"},
666 | {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"},
667 | {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"},
668 | {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"},
669 | {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"},
670 | ]
671 |
672 | [[package]]
673 | name = "tomlkit"
674 | version = "0.13.2"
675 | description = "Style preserving TOML library"
676 | optional = false
677 | python-versions = ">=3.8"
678 | files = [
679 | {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"},
680 | {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"},
681 | ]
682 |
683 | [[package]]
684 | name = "types-requests"
685 | version = "2.32.0.20241016"
686 | description = "Typing stubs for requests"
687 | optional = false
688 | python-versions = ">=3.8"
689 | files = [
690 | {file = "types-requests-2.32.0.20241016.tar.gz", hash = "sha256:0d9cad2f27515d0e3e3da7134a1b6f28fb97129d86b867f24d9c726452634d95"},
691 | {file = "types_requests-2.32.0.20241016-py3-none-any.whl", hash = "sha256:4195d62d6d3e043a4eaaf08ff8a62184584d2e8684e9d2aa178c7915a7da3747"},
692 | ]
693 |
694 | [package.dependencies]
695 | urllib3 = ">=2"
696 |
697 | [[package]]
698 | name = "typing-extensions"
699 | version = "4.12.2"
700 | description = "Backported and Experimental Type Hints for Python 3.8+"
701 | optional = false
702 | python-versions = ">=3.8"
703 | files = [
704 | {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"},
705 | {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"},
706 | ]
707 |
708 | [[package]]
709 | name = "urllib3"
710 | version = "2.2.3"
711 | description = "HTTP library with thread-safe connection pooling, file post, and more."
712 | optional = false
713 | python-versions = ">=3.8"
714 | files = [
715 | {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"},
716 | {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"},
717 | ]
718 |
719 | [package.extras]
720 | brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"]
721 | h2 = ["h2 (>=4,<5)"]
722 | socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
723 | zstd = ["zstandard (>=0.18.0)"]
724 |
725 | [metadata]
726 | lock-version = "2.0"
727 | python-versions = "^3.8"
728 | content-hash = "c893f0793d7419d6b0b2b4c67f3e7795f8434f1f5077e5818780baeb20a3efed"
729 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "gh_release_install"
3 | version = "0.11.2"
4 | description = "CLI helper to install Github releases on your system."
5 | readme = "README.md"
6 | authors = ["Joola "]
7 | classifiers = [
8 | "Development Status :: 3 - Alpha",
9 | "Environment :: Console",
10 | "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
11 | "Programming Language :: Python",
12 | "Programming Language :: Python :: 3",
13 | "Programming Language :: Python :: 3.8",
14 | "Programming Language :: Python :: 3.9",
15 | "Programming Language :: Python :: 3.10",
16 | "Programming Language :: Python :: 3.11",
17 | "Programming Language :: Python :: 3.12",
18 | "Topic :: System :: Installation/Setup",
19 | "Topic :: System :: Software Distribution",
20 | ]
21 |
22 | [tool.poetry.scripts]
23 | gh-release-install = "gh_release_install.cli:run"
24 |
25 | [tool.poetry.dependencies]
26 | python = "^3.8"
27 | requests = ">=2.32.3, <2.33"
28 |
29 | [tool.poetry.group.dev.dependencies]
30 | black = "^24.0.0"
31 | isort = "^5.9.3"
32 | mypy = "^1.0.0"
33 | pylint = "^3.0.0"
34 | pytest = "^8.0.0"
35 | pytest-cov = "^5.0.0"
36 | pytest-xdist = "^3.0.0"
37 | requests-mock = "^1.9.3"
38 | types-requests = "^2.31.0"
39 |
40 | [build-system]
41 | requires = ["poetry-core>=1.0.0"]
42 | build-backend = "poetry.core.masonry.api"
43 |
44 | [tool.pylint.messages_control]
45 | disable = [
46 | "missing-module-docstring",
47 | "missing-function-docstring",
48 | "missing-class-docstring",
49 | ]
50 |
51 | [tool.isort]
52 | profile = "black"
53 | combine_as_imports = true
54 | add_imports = ["from __future__ import annotations"]
55 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": [
4 | "config:recommended",
5 | ":enablePreCommit",
6 | ":preserveSemverRanges",
7 | ":semanticCommits"
8 | ],
9 | "labels": ["dependencies"],
10 | "lockFileMaintenance": {
11 | "enabled": true,
12 | "automerge": true,
13 | "schedule": ["after 4am and before 5am on monday"]
14 | },
15 | "packageRules": [
16 | {
17 | "matchUpdateTypes": ["patch"],
18 | "automerge": true
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/tests/checksum_test.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from pathlib import Path
4 |
5 | import pytest
6 |
7 | from gh_release_install.checksum import (
8 | compute_file_checksum,
9 | find_checksum_in_file,
10 | parse_checksum_option,
11 | )
12 |
13 | here = Path(__file__).parent
14 |
15 |
16 | @pytest.mark.parametrize(
17 | "value, expected",
18 | [
19 | (
20 | "sha256:SHA256SUMS",
21 | ("sha256", "SHA256SUMS"),
22 | ),
23 | (
24 | "sha256:https://example.org/SHA256SUMS",
25 | ("sha256", "https://example.org/SHA256SUMS"),
26 | ),
27 | ],
28 | )
29 | def test_parse_checksum_option(value, expected):
30 | assert parse_checksum_option(value) == expected
31 |
32 |
33 | @pytest.mark.parametrize(
34 | "hash_name, expected",
35 | [
36 | pytest.param(
37 | "md5",
38 | "3a49580590b7b002b74db6195c1a8e15",
39 | id="md5",
40 | ),
41 | pytest.param(
42 | "sha1",
43 | "382b1c013eec3d67ac05f9a3266ad1fa0707ce95",
44 | id="sha1",
45 | ),
46 | pytest.param(
47 | "sha224",
48 | "1d6195eb3abd996abdd72956809e5a1aff37673e97991aefaa20102a",
49 | id="sha224",
50 | ),
51 | pytest.param(
52 | "sha256",
53 | "484aedc04288b02f69eee1c20e98c588125fa960b43e5e129d5d36b93bb62072",
54 | id="sha256",
55 | ),
56 | pytest.param(
57 | "sha384",
58 | "b843bbe29c982d782ea95cd23b78569220d4635eeceb5c1572d00da3e0560dd5"
59 | "aaeb8799b76f8df457efa0fe47fd71f0",
60 | id="sha384",
61 | ),
62 | pytest.param(
63 | "sha512",
64 | "395347e504b64cd3e76c2741f2ca5bb3c1212b60b605c34cb6c69fea1db5831e"
65 | "299be54c87afa19582bd5834a1260bcc8055266f635d9fba00570309a99c0eb3",
66 | id="sha512",
67 | ),
68 | ],
69 | )
70 | def test_compute_file_checksum(hash_name, expected):
71 | assert compute_file_checksum(hash_name, here / "fixtures/test.txt.bz2") == expected
72 |
73 |
74 | @pytest.mark.parametrize(
75 | "content, expected",
76 | [
77 | pytest.param(
78 | "11111111111111111111111111111111 test.txt.bz2.suffix\n"
79 | "3a49580590b7b002b74db6195c1a8e15 test.txt.bz2\n"
80 | "11111111111111111111111111111111 prefix.test.txt.bz2\n",
81 | "3a49580590b7b002b74db6195c1a8e15",
82 | id="md5sum",
83 | ),
84 | pytest.param(
85 | "1111111111111111111111111111111111111111 test.txt.bz2.suffix\n"
86 | "382b1c013eec3d67ac05f9a3266ad1fa0707ce95 test.txt.bz2\n"
87 | "1111111111111111111111111111111111111111 prefix.test.txt.bz2\n",
88 | "382b1c013eec3d67ac05f9a3266ad1fa0707ce95",
89 | id="sha1sum",
90 | ),
91 | ],
92 | )
93 | def test_find_checksum_in_file(content, expected):
94 | assert find_checksum_in_file(content, "test.txt.bz2") == expected
95 |
--------------------------------------------------------------------------------
/tests/conftest.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | import pytest
4 |
5 | from gh_release_install import GhReleaseInstall
6 |
7 |
8 | @pytest.fixture
9 | def installer():
10 | return GhReleaseInstall(
11 | repository="prometheus/prometheus",
12 | asset="prometheus-{version}.linux-amd64.tar.gz",
13 | extract="prometheus-{version}.linux-amd64/prometheus",
14 | destination="/usr/local/bin/prometheus",
15 | )
16 |
--------------------------------------------------------------------------------
/tests/fixtures/gh_releases_latest.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/45574049",
3 | "assets_url": "https://api.github.com/repos/prometheus/prometheus/releases/45574049/assets",
4 | "upload_url": "https://uploads.github.com/repos/prometheus/prometheus/releases/45574049/assets{?name,label}",
5 | "html_url": "https://github.com/prometheus/prometheus/releases/tag/v2.28.1",
6 | "id": 45574049,
7 | "author": {
8 | "login": "prombot",
9 | "id": 18470668,
10 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
11 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
12 | "gravatar_id": "",
13 | "url": "https://api.github.com/users/prombot",
14 | "html_url": "https://github.com/prombot",
15 | "followers_url": "https://api.github.com/users/prombot/followers",
16 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
17 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
18 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
19 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
20 | "organizations_url": "https://api.github.com/users/prombot/orgs",
21 | "repos_url": "https://api.github.com/users/prombot/repos",
22 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
23 | "received_events_url": "https://api.github.com/users/prombot/received_events",
24 | "type": "User",
25 | "site_admin": false
26 | },
27 | "node_id": "MDc6UmVsZWFzZTQ1NTc0MDQ5",
28 | "tag_name": "v2.28.1",
29 | "target_commitish": "b0944590a1c9a6b35dc5a696869f75f422b107a1",
30 | "name": "2.28.1 / 2021-07-01",
31 | "draft": false,
32 | "prerelease": false,
33 | "created_at": "2021-07-01T13:38:23Z",
34 | "published_at": "2021-07-01T18:19:38Z",
35 | "assets": [
36 | {
37 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565214",
38 | "id": 39565214,
39 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjE0",
40 | "name": "prometheus-2.28.1.darwin-amd64.tar.gz",
41 | "label": "",
42 | "uploader": {
43 | "login": "prombot",
44 | "id": 18470668,
45 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
46 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
47 | "gravatar_id": "",
48 | "url": "https://api.github.com/users/prombot",
49 | "html_url": "https://github.com/prombot",
50 | "followers_url": "https://api.github.com/users/prombot/followers",
51 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
52 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
53 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
54 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
55 | "organizations_url": "https://api.github.com/users/prombot/orgs",
56 | "repos_url": "https://api.github.com/users/prombot/repos",
57 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
58 | "received_events_url": "https://api.github.com/users/prombot/received_events",
59 | "type": "User",
60 | "site_admin": false
61 | },
62 | "content_type": "application/gzip",
63 | "state": "uploaded",
64 | "size": 71244430,
65 | "download_count": 2370,
66 | "created_at": "2021-07-01T16:36:12Z",
67 | "updated_at": "2021-07-01T16:36:14Z",
68 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.darwin-amd64.tar.gz"
69 | },
70 | {
71 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565218",
72 | "id": 39565218,
73 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjE4",
74 | "name": "prometheus-2.28.1.darwin-arm64.tar.gz",
75 | "label": "",
76 | "uploader": {
77 | "login": "prombot",
78 | "id": 18470668,
79 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
80 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
81 | "gravatar_id": "",
82 | "url": "https://api.github.com/users/prombot",
83 | "html_url": "https://github.com/prombot",
84 | "followers_url": "https://api.github.com/users/prombot/followers",
85 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
86 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
87 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
88 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
89 | "organizations_url": "https://api.github.com/users/prombot/orgs",
90 | "repos_url": "https://api.github.com/users/prombot/repos",
91 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
92 | "received_events_url": "https://api.github.com/users/prombot/received_events",
93 | "type": "User",
94 | "site_admin": false
95 | },
96 | "content_type": "application/gzip",
97 | "state": "uploaded",
98 | "size": 70570778,
99 | "download_count": 119,
100 | "created_at": "2021-07-01T16:36:14Z",
101 | "updated_at": "2021-07-01T16:36:16Z",
102 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.darwin-arm64.tar.gz"
103 | },
104 | {
105 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565219",
106 | "id": 39565219,
107 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjE5",
108 | "name": "prometheus-2.28.1.dragonfly-amd64.tar.gz",
109 | "label": "",
110 | "uploader": {
111 | "login": "prombot",
112 | "id": 18470668,
113 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
114 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
115 | "gravatar_id": "",
116 | "url": "https://api.github.com/users/prombot",
117 | "html_url": "https://github.com/prombot",
118 | "followers_url": "https://api.github.com/users/prombot/followers",
119 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
120 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
121 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
122 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
123 | "organizations_url": "https://api.github.com/users/prombot/orgs",
124 | "repos_url": "https://api.github.com/users/prombot/repos",
125 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
126 | "received_events_url": "https://api.github.com/users/prombot/received_events",
127 | "type": "User",
128 | "site_admin": false
129 | },
130 | "content_type": "application/gzip",
131 | "state": "uploaded",
132 | "size": 70997797,
133 | "download_count": 38,
134 | "created_at": "2021-07-01T16:36:16Z",
135 | "updated_at": "2021-07-01T16:36:17Z",
136 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.dragonfly-amd64.tar.gz"
137 | },
138 | {
139 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565221",
140 | "id": 39565221,
141 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjIx",
142 | "name": "prometheus-2.28.1.freebsd-386.tar.gz",
143 | "label": "",
144 | "uploader": {
145 | "login": "prombot",
146 | "id": 18470668,
147 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
148 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
149 | "gravatar_id": "",
150 | "url": "https://api.github.com/users/prombot",
151 | "html_url": "https://github.com/prombot",
152 | "followers_url": "https://api.github.com/users/prombot/followers",
153 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
154 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
155 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
156 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
157 | "organizations_url": "https://api.github.com/users/prombot/orgs",
158 | "repos_url": "https://api.github.com/users/prombot/repos",
159 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
160 | "received_events_url": "https://api.github.com/users/prombot/received_events",
161 | "type": "User",
162 | "site_admin": false
163 | },
164 | "content_type": "application/gzip",
165 | "state": "uploaded",
166 | "size": 67747560,
167 | "download_count": 43,
168 | "created_at": "2021-07-01T16:36:17Z",
169 | "updated_at": "2021-07-01T16:36:19Z",
170 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.freebsd-386.tar.gz"
171 | },
172 | {
173 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565223",
174 | "id": 39565223,
175 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjIz",
176 | "name": "prometheus-2.28.1.freebsd-amd64.tar.gz",
177 | "label": "",
178 | "uploader": {
179 | "login": "prombot",
180 | "id": 18470668,
181 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
182 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
183 | "gravatar_id": "",
184 | "url": "https://api.github.com/users/prombot",
185 | "html_url": "https://github.com/prombot",
186 | "followers_url": "https://api.github.com/users/prombot/followers",
187 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
188 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
189 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
190 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
191 | "organizations_url": "https://api.github.com/users/prombot/orgs",
192 | "repos_url": "https://api.github.com/users/prombot/repos",
193 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
194 | "received_events_url": "https://api.github.com/users/prombot/received_events",
195 | "type": "User",
196 | "site_admin": false
197 | },
198 | "content_type": "application/gzip",
199 | "state": "uploaded",
200 | "size": 71045438,
201 | "download_count": 82,
202 | "created_at": "2021-07-01T16:36:19Z",
203 | "updated_at": "2021-07-01T16:36:21Z",
204 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.freebsd-amd64.tar.gz"
205 | },
206 | {
207 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565225",
208 | "id": 39565225,
209 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjI1",
210 | "name": "prometheus-2.28.1.freebsd-arm64.tar.gz",
211 | "label": "",
212 | "uploader": {
213 | "login": "prombot",
214 | "id": 18470668,
215 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
216 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
217 | "gravatar_id": "",
218 | "url": "https://api.github.com/users/prombot",
219 | "html_url": "https://github.com/prombot",
220 | "followers_url": "https://api.github.com/users/prombot/followers",
221 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
222 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
223 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
224 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
225 | "organizations_url": "https://api.github.com/users/prombot/orgs",
226 | "repos_url": "https://api.github.com/users/prombot/repos",
227 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
228 | "received_events_url": "https://api.github.com/users/prombot/received_events",
229 | "type": "User",
230 | "site_admin": false
231 | },
232 | "content_type": "application/gzip",
233 | "state": "uploaded",
234 | "size": 66475913,
235 | "download_count": 38,
236 | "created_at": "2021-07-01T16:36:21Z",
237 | "updated_at": "2021-07-01T16:36:23Z",
238 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.freebsd-arm64.tar.gz"
239 | },
240 | {
241 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565226",
242 | "id": 39565226,
243 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjI2",
244 | "name": "prometheus-2.28.1.freebsd-armv6.tar.gz",
245 | "label": "",
246 | "uploader": {
247 | "login": "prombot",
248 | "id": 18470668,
249 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
250 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
251 | "gravatar_id": "",
252 | "url": "https://api.github.com/users/prombot",
253 | "html_url": "https://github.com/prombot",
254 | "followers_url": "https://api.github.com/users/prombot/followers",
255 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
256 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
257 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
258 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
259 | "organizations_url": "https://api.github.com/users/prombot/orgs",
260 | "repos_url": "https://api.github.com/users/prombot/repos",
261 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
262 | "received_events_url": "https://api.github.com/users/prombot/received_events",
263 | "type": "User",
264 | "site_admin": false
265 | },
266 | "content_type": "application/gzip",
267 | "state": "uploaded",
268 | "size": 65821951,
269 | "download_count": 36,
270 | "created_at": "2021-07-01T16:36:23Z",
271 | "updated_at": "2021-07-01T16:36:25Z",
272 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.freebsd-armv6.tar.gz"
273 | },
274 | {
275 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565229",
276 | "id": 39565229,
277 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjI5",
278 | "name": "prometheus-2.28.1.freebsd-armv7.tar.gz",
279 | "label": "",
280 | "uploader": {
281 | "login": "prombot",
282 | "id": 18470668,
283 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
284 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
285 | "gravatar_id": "",
286 | "url": "https://api.github.com/users/prombot",
287 | "html_url": "https://github.com/prombot",
288 | "followers_url": "https://api.github.com/users/prombot/followers",
289 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
290 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
291 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
292 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
293 | "organizations_url": "https://api.github.com/users/prombot/orgs",
294 | "repos_url": "https://api.github.com/users/prombot/repos",
295 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
296 | "received_events_url": "https://api.github.com/users/prombot/received_events",
297 | "type": "User",
298 | "site_admin": false
299 | },
300 | "content_type": "application/gzip",
301 | "state": "uploaded",
302 | "size": 65795070,
303 | "download_count": 32,
304 | "created_at": "2021-07-01T16:36:25Z",
305 | "updated_at": "2021-07-01T16:36:26Z",
306 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.freebsd-armv7.tar.gz"
307 | },
308 | {
309 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565230",
310 | "id": 39565230,
311 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjMw",
312 | "name": "prometheus-2.28.1.illumos-amd64.tar.gz",
313 | "label": "",
314 | "uploader": {
315 | "login": "prombot",
316 | "id": 18470668,
317 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
318 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
319 | "gravatar_id": "",
320 | "url": "https://api.github.com/users/prombot",
321 | "html_url": "https://github.com/prombot",
322 | "followers_url": "https://api.github.com/users/prombot/followers",
323 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
324 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
325 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
326 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
327 | "organizations_url": "https://api.github.com/users/prombot/orgs",
328 | "repos_url": "https://api.github.com/users/prombot/repos",
329 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
330 | "received_events_url": "https://api.github.com/users/prombot/received_events",
331 | "type": "User",
332 | "site_admin": false
333 | },
334 | "content_type": "application/gzip",
335 | "state": "uploaded",
336 | "size": 70901713,
337 | "download_count": 59,
338 | "created_at": "2021-07-01T16:36:26Z",
339 | "updated_at": "2021-07-01T16:36:28Z",
340 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.illumos-amd64.tar.gz"
341 | },
342 | {
343 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565231",
344 | "id": 39565231,
345 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjMx",
346 | "name": "prometheus-2.28.1.linux-386.tar.gz",
347 | "label": "",
348 | "uploader": {
349 | "login": "prombot",
350 | "id": 18470668,
351 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
352 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
353 | "gravatar_id": "",
354 | "url": "https://api.github.com/users/prombot",
355 | "html_url": "https://github.com/prombot",
356 | "followers_url": "https://api.github.com/users/prombot/followers",
357 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
358 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
359 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
360 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
361 | "organizations_url": "https://api.github.com/users/prombot/orgs",
362 | "repos_url": "https://api.github.com/users/prombot/repos",
363 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
364 | "received_events_url": "https://api.github.com/users/prombot/received_events",
365 | "type": "User",
366 | "site_admin": false
367 | },
368 | "content_type": "application/gzip",
369 | "state": "uploaded",
370 | "size": 67887621,
371 | "download_count": 334,
372 | "created_at": "2021-07-01T16:36:28Z",
373 | "updated_at": "2021-07-01T16:36:30Z",
374 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-386.tar.gz"
375 | },
376 | {
377 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565233",
378 | "id": 39565233,
379 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjMz",
380 | "name": "prometheus-2.28.1.linux-amd64.tar.gz",
381 | "label": "",
382 | "uploader": {
383 | "login": "prombot",
384 | "id": 18470668,
385 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
386 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
387 | "gravatar_id": "",
388 | "url": "https://api.github.com/users/prombot",
389 | "html_url": "https://github.com/prombot",
390 | "followers_url": "https://api.github.com/users/prombot/followers",
391 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
392 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
393 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
394 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
395 | "organizations_url": "https://api.github.com/users/prombot/orgs",
396 | "repos_url": "https://api.github.com/users/prombot/repos",
397 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
398 | "received_events_url": "https://api.github.com/users/prombot/received_events",
399 | "type": "User",
400 | "site_admin": false
401 | },
402 | "content_type": "application/gzip",
403 | "state": "uploaded",
404 | "size": 71109475,
405 | "download_count": 30324,
406 | "created_at": "2021-07-01T16:36:30Z",
407 | "updated_at": "2021-07-01T16:36:32Z",
408 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-amd64.tar.gz"
409 | },
410 | {
411 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565236",
412 | "id": 39565236,
413 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjM2",
414 | "name": "prometheus-2.28.1.linux-arm64.tar.gz",
415 | "label": "",
416 | "uploader": {
417 | "login": "prombot",
418 | "id": 18470668,
419 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
420 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
421 | "gravatar_id": "",
422 | "url": "https://api.github.com/users/prombot",
423 | "html_url": "https://github.com/prombot",
424 | "followers_url": "https://api.github.com/users/prombot/followers",
425 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
426 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
427 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
428 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
429 | "organizations_url": "https://api.github.com/users/prombot/orgs",
430 | "repos_url": "https://api.github.com/users/prombot/repos",
431 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
432 | "received_events_url": "https://api.github.com/users/prombot/received_events",
433 | "type": "User",
434 | "site_admin": false
435 | },
436 | "content_type": "application/gzip",
437 | "state": "uploaded",
438 | "size": 66883455,
439 | "download_count": 985,
440 | "created_at": "2021-07-01T16:36:32Z",
441 | "updated_at": "2021-07-01T16:36:33Z",
442 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-arm64.tar.gz"
443 | },
444 | {
445 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565239",
446 | "id": 39565239,
447 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjM5",
448 | "name": "prometheus-2.28.1.linux-armv5.tar.gz",
449 | "label": "",
450 | "uploader": {
451 | "login": "prombot",
452 | "id": 18470668,
453 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
454 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
455 | "gravatar_id": "",
456 | "url": "https://api.github.com/users/prombot",
457 | "html_url": "https://github.com/prombot",
458 | "followers_url": "https://api.github.com/users/prombot/followers",
459 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
460 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
461 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
462 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
463 | "organizations_url": "https://api.github.com/users/prombot/orgs",
464 | "repos_url": "https://api.github.com/users/prombot/repos",
465 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
466 | "received_events_url": "https://api.github.com/users/prombot/received_events",
467 | "type": "User",
468 | "site_admin": false
469 | },
470 | "content_type": "application/gzip",
471 | "state": "uploaded",
472 | "size": 66068504,
473 | "download_count": 33,
474 | "created_at": "2021-07-01T16:36:33Z",
475 | "updated_at": "2021-07-01T16:36:35Z",
476 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-armv5.tar.gz"
477 | },
478 | {
479 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565241",
480 | "id": 39565241,
481 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjQx",
482 | "name": "prometheus-2.28.1.linux-armv6.tar.gz",
483 | "label": "",
484 | "uploader": {
485 | "login": "prombot",
486 | "id": 18470668,
487 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
488 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
489 | "gravatar_id": "",
490 | "url": "https://api.github.com/users/prombot",
491 | "html_url": "https://github.com/prombot",
492 | "followers_url": "https://api.github.com/users/prombot/followers",
493 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
494 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
495 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
496 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
497 | "organizations_url": "https://api.github.com/users/prombot/orgs",
498 | "repos_url": "https://api.github.com/users/prombot/repos",
499 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
500 | "received_events_url": "https://api.github.com/users/prombot/received_events",
501 | "type": "User",
502 | "site_admin": false
503 | },
504 | "content_type": "application/gzip",
505 | "state": "uploaded",
506 | "size": 65895901,
507 | "download_count": 109,
508 | "created_at": "2021-07-01T16:36:35Z",
509 | "updated_at": "2021-07-01T16:36:38Z",
510 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-armv6.tar.gz"
511 | },
512 | {
513 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565244",
514 | "id": 39565244,
515 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjQ0",
516 | "name": "prometheus-2.28.1.linux-armv7.tar.gz",
517 | "label": "",
518 | "uploader": {
519 | "login": "prombot",
520 | "id": 18470668,
521 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
522 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
523 | "gravatar_id": "",
524 | "url": "https://api.github.com/users/prombot",
525 | "html_url": "https://github.com/prombot",
526 | "followers_url": "https://api.github.com/users/prombot/followers",
527 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
528 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
529 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
530 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
531 | "organizations_url": "https://api.github.com/users/prombot/orgs",
532 | "repos_url": "https://api.github.com/users/prombot/repos",
533 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
534 | "received_events_url": "https://api.github.com/users/prombot/received_events",
535 | "type": "User",
536 | "site_admin": false
537 | },
538 | "content_type": "application/gzip",
539 | "state": "uploaded",
540 | "size": 65878407,
541 | "download_count": 616,
542 | "created_at": "2021-07-01T16:36:39Z",
543 | "updated_at": "2021-07-01T16:36:40Z",
544 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-armv7.tar.gz"
545 | },
546 | {
547 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565247",
548 | "id": 39565247,
549 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjQ3",
550 | "name": "prometheus-2.28.1.linux-mips.tar.gz",
551 | "label": "",
552 | "uploader": {
553 | "login": "prombot",
554 | "id": 18470668,
555 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
556 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
557 | "gravatar_id": "",
558 | "url": "https://api.github.com/users/prombot",
559 | "html_url": "https://github.com/prombot",
560 | "followers_url": "https://api.github.com/users/prombot/followers",
561 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
562 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
563 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
564 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
565 | "organizations_url": "https://api.github.com/users/prombot/orgs",
566 | "repos_url": "https://api.github.com/users/prombot/repos",
567 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
568 | "received_events_url": "https://api.github.com/users/prombot/received_events",
569 | "type": "User",
570 | "site_admin": false
571 | },
572 | "content_type": "application/gzip",
573 | "state": "uploaded",
574 | "size": 64318929,
575 | "download_count": 34,
576 | "created_at": "2021-07-01T16:36:40Z",
577 | "updated_at": "2021-07-01T16:36:42Z",
578 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-mips.tar.gz"
579 | },
580 | {
581 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565259",
582 | "id": 39565259,
583 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjU5",
584 | "name": "prometheus-2.28.1.linux-mips64.tar.gz",
585 | "label": "",
586 | "uploader": {
587 | "login": "prombot",
588 | "id": 18470668,
589 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
590 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
591 | "gravatar_id": "",
592 | "url": "https://api.github.com/users/prombot",
593 | "html_url": "https://github.com/prombot",
594 | "followers_url": "https://api.github.com/users/prombot/followers",
595 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
596 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
597 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
598 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
599 | "organizations_url": "https://api.github.com/users/prombot/orgs",
600 | "repos_url": "https://api.github.com/users/prombot/repos",
601 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
602 | "received_events_url": "https://api.github.com/users/prombot/received_events",
603 | "type": "User",
604 | "site_admin": false
605 | },
606 | "content_type": "application/gzip",
607 | "state": "uploaded",
608 | "size": 64925222,
609 | "download_count": 32,
610 | "created_at": "2021-07-01T16:36:42Z",
611 | "updated_at": "2021-07-01T16:36:43Z",
612 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-mips64.tar.gz"
613 | },
614 | {
615 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565266",
616 | "id": 39565266,
617 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MjY2",
618 | "name": "prometheus-2.28.1.linux-mips64le.tar.gz",
619 | "label": "",
620 | "uploader": {
621 | "login": "prombot",
622 | "id": 18470668,
623 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
624 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
625 | "gravatar_id": "",
626 | "url": "https://api.github.com/users/prombot",
627 | "html_url": "https://github.com/prombot",
628 | "followers_url": "https://api.github.com/users/prombot/followers",
629 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
630 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
631 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
632 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
633 | "organizations_url": "https://api.github.com/users/prombot/orgs",
634 | "repos_url": "https://api.github.com/users/prombot/repos",
635 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
636 | "received_events_url": "https://api.github.com/users/prombot/received_events",
637 | "type": "User",
638 | "site_admin": false
639 | },
640 | "content_type": "application/gzip",
641 | "state": "uploaded",
642 | "size": 62239598,
643 | "download_count": 37,
644 | "created_at": "2021-07-01T16:36:43Z",
645 | "updated_at": "2021-07-01T16:36:45Z",
646 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-mips64le.tar.gz"
647 | },
648 | {
649 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565270",
650 | "id": 39565270,
651 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjcw",
652 | "name": "prometheus-2.28.1.linux-mipsle.tar.gz",
653 | "label": "",
654 | "uploader": {
655 | "login": "prombot",
656 | "id": 18470668,
657 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
658 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
659 | "gravatar_id": "",
660 | "url": "https://api.github.com/users/prombot",
661 | "html_url": "https://github.com/prombot",
662 | "followers_url": "https://api.github.com/users/prombot/followers",
663 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
664 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
665 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
666 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
667 | "organizations_url": "https://api.github.com/users/prombot/orgs",
668 | "repos_url": "https://api.github.com/users/prombot/repos",
669 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
670 | "received_events_url": "https://api.github.com/users/prombot/received_events",
671 | "type": "User",
672 | "site_admin": false
673 | },
674 | "content_type": "application/gzip",
675 | "state": "uploaded",
676 | "size": 62480996,
677 | "download_count": 32,
678 | "created_at": "2021-07-01T16:36:45Z",
679 | "updated_at": "2021-07-01T16:36:46Z",
680 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-mipsle.tar.gz"
681 | },
682 | {
683 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565272",
684 | "id": 39565272,
685 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjcy",
686 | "name": "prometheus-2.28.1.linux-ppc64.tar.gz",
687 | "label": "",
688 | "uploader": {
689 | "login": "prombot",
690 | "id": 18470668,
691 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
692 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
693 | "gravatar_id": "",
694 | "url": "https://api.github.com/users/prombot",
695 | "html_url": "https://github.com/prombot",
696 | "followers_url": "https://api.github.com/users/prombot/followers",
697 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
698 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
699 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
700 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
701 | "organizations_url": "https://api.github.com/users/prombot/orgs",
702 | "repos_url": "https://api.github.com/users/prombot/repos",
703 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
704 | "received_events_url": "https://api.github.com/users/prombot/received_events",
705 | "type": "User",
706 | "site_admin": false
707 | },
708 | "content_type": "application/gzip",
709 | "state": "uploaded",
710 | "size": 67725523,
711 | "download_count": 35,
712 | "created_at": "2021-07-01T16:36:47Z",
713 | "updated_at": "2021-07-01T16:36:49Z",
714 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-ppc64.tar.gz"
715 | },
716 | {
717 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565277",
718 | "id": 39565277,
719 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjc3",
720 | "name": "prometheus-2.28.1.linux-ppc64le.tar.gz",
721 | "label": "",
722 | "uploader": {
723 | "login": "prombot",
724 | "id": 18470668,
725 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
726 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
727 | "gravatar_id": "",
728 | "url": "https://api.github.com/users/prombot",
729 | "html_url": "https://github.com/prombot",
730 | "followers_url": "https://api.github.com/users/prombot/followers",
731 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
732 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
733 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
734 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
735 | "organizations_url": "https://api.github.com/users/prombot/orgs",
736 | "repos_url": "https://api.github.com/users/prombot/repos",
737 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
738 | "received_events_url": "https://api.github.com/users/prombot/received_events",
739 | "type": "User",
740 | "site_admin": false
741 | },
742 | "content_type": "application/gzip",
743 | "state": "uploaded",
744 | "size": 65075568,
745 | "download_count": 45,
746 | "created_at": "2021-07-01T16:36:49Z",
747 | "updated_at": "2021-07-01T16:36:50Z",
748 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-ppc64le.tar.gz"
749 | },
750 | {
751 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565281",
752 | "id": 39565281,
753 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjgx",
754 | "name": "prometheus-2.28.1.linux-s390x.tar.gz",
755 | "label": "",
756 | "uploader": {
757 | "login": "prombot",
758 | "id": 18470668,
759 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
760 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
761 | "gravatar_id": "",
762 | "url": "https://api.github.com/users/prombot",
763 | "html_url": "https://github.com/prombot",
764 | "followers_url": "https://api.github.com/users/prombot/followers",
765 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
766 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
767 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
768 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
769 | "organizations_url": "https://api.github.com/users/prombot/orgs",
770 | "repos_url": "https://api.github.com/users/prombot/repos",
771 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
772 | "received_events_url": "https://api.github.com/users/prombot/received_events",
773 | "type": "User",
774 | "site_admin": false
775 | },
776 | "content_type": "application/gzip",
777 | "state": "uploaded",
778 | "size": 71465908,
779 | "download_count": 69,
780 | "created_at": "2021-07-01T16:36:50Z",
781 | "updated_at": "2021-07-01T16:36:52Z",
782 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-s390x.tar.gz"
783 | },
784 | {
785 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565283",
786 | "id": 39565283,
787 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjgz",
788 | "name": "prometheus-2.28.1.netbsd-386.tar.gz",
789 | "label": "",
790 | "uploader": {
791 | "login": "prombot",
792 | "id": 18470668,
793 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
794 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
795 | "gravatar_id": "",
796 | "url": "https://api.github.com/users/prombot",
797 | "html_url": "https://github.com/prombot",
798 | "followers_url": "https://api.github.com/users/prombot/followers",
799 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
800 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
801 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
802 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
803 | "organizations_url": "https://api.github.com/users/prombot/orgs",
804 | "repos_url": "https://api.github.com/users/prombot/repos",
805 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
806 | "received_events_url": "https://api.github.com/users/prombot/received_events",
807 | "type": "User",
808 | "site_admin": false
809 | },
810 | "content_type": "application/gzip",
811 | "state": "uploaded",
812 | "size": 67694876,
813 | "download_count": 31,
814 | "created_at": "2021-07-01T16:36:52Z",
815 | "updated_at": "2021-07-01T16:36:54Z",
816 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.netbsd-386.tar.gz"
817 | },
818 | {
819 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565287",
820 | "id": 39565287,
821 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjg3",
822 | "name": "prometheus-2.28.1.netbsd-amd64.tar.gz",
823 | "label": "",
824 | "uploader": {
825 | "login": "prombot",
826 | "id": 18470668,
827 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
828 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
829 | "gravatar_id": "",
830 | "url": "https://api.github.com/users/prombot",
831 | "html_url": "https://github.com/prombot",
832 | "followers_url": "https://api.github.com/users/prombot/followers",
833 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
834 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
835 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
836 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
837 | "organizations_url": "https://api.github.com/users/prombot/orgs",
838 | "repos_url": "https://api.github.com/users/prombot/repos",
839 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
840 | "received_events_url": "https://api.github.com/users/prombot/received_events",
841 | "type": "User",
842 | "site_admin": false
843 | },
844 | "content_type": "application/gzip",
845 | "state": "uploaded",
846 | "size": 70981601,
847 | "download_count": 42,
848 | "created_at": "2021-07-01T16:36:54Z",
849 | "updated_at": "2021-07-01T16:36:56Z",
850 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.netbsd-amd64.tar.gz"
851 | },
852 | {
853 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565289",
854 | "id": 39565289,
855 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjg5",
856 | "name": "prometheus-2.28.1.netbsd-arm64.tar.gz",
857 | "label": "",
858 | "uploader": {
859 | "login": "prombot",
860 | "id": 18470668,
861 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
862 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
863 | "gravatar_id": "",
864 | "url": "https://api.github.com/users/prombot",
865 | "html_url": "https://github.com/prombot",
866 | "followers_url": "https://api.github.com/users/prombot/followers",
867 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
868 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
869 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
870 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
871 | "organizations_url": "https://api.github.com/users/prombot/orgs",
872 | "repos_url": "https://api.github.com/users/prombot/repos",
873 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
874 | "received_events_url": "https://api.github.com/users/prombot/received_events",
875 | "type": "User",
876 | "site_admin": false
877 | },
878 | "content_type": "application/gzip",
879 | "state": "uploaded",
880 | "size": 66420539,
881 | "download_count": 36,
882 | "created_at": "2021-07-01T16:36:56Z",
883 | "updated_at": "2021-07-01T16:36:57Z",
884 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.netbsd-arm64.tar.gz"
885 | },
886 | {
887 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565291",
888 | "id": 39565291,
889 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjkx",
890 | "name": "prometheus-2.28.1.netbsd-armv6.tar.gz",
891 | "label": "",
892 | "uploader": {
893 | "login": "prombot",
894 | "id": 18470668,
895 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
896 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
897 | "gravatar_id": "",
898 | "url": "https://api.github.com/users/prombot",
899 | "html_url": "https://github.com/prombot",
900 | "followers_url": "https://api.github.com/users/prombot/followers",
901 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
902 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
903 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
904 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
905 | "organizations_url": "https://api.github.com/users/prombot/orgs",
906 | "repos_url": "https://api.github.com/users/prombot/repos",
907 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
908 | "received_events_url": "https://api.github.com/users/prombot/received_events",
909 | "type": "User",
910 | "site_admin": false
911 | },
912 | "content_type": "application/gzip",
913 | "state": "uploaded",
914 | "size": 65770179,
915 | "download_count": 33,
916 | "created_at": "2021-07-01T16:36:58Z",
917 | "updated_at": "2021-07-01T16:37:00Z",
918 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.netbsd-armv6.tar.gz"
919 | },
920 | {
921 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565294",
922 | "id": 39565294,
923 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjk0",
924 | "name": "prometheus-2.28.1.netbsd-armv7.tar.gz",
925 | "label": "",
926 | "uploader": {
927 | "login": "prombot",
928 | "id": 18470668,
929 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
930 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
931 | "gravatar_id": "",
932 | "url": "https://api.github.com/users/prombot",
933 | "html_url": "https://github.com/prombot",
934 | "followers_url": "https://api.github.com/users/prombot/followers",
935 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
936 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
937 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
938 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
939 | "organizations_url": "https://api.github.com/users/prombot/orgs",
940 | "repos_url": "https://api.github.com/users/prombot/repos",
941 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
942 | "received_events_url": "https://api.github.com/users/prombot/received_events",
943 | "type": "User",
944 | "site_admin": false
945 | },
946 | "content_type": "application/gzip",
947 | "state": "uploaded",
948 | "size": 65746421,
949 | "download_count": 29,
950 | "created_at": "2021-07-01T16:37:00Z",
951 | "updated_at": "2021-07-01T16:37:01Z",
952 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.netbsd-armv7.tar.gz"
953 | },
954 | {
955 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565295",
956 | "id": 39565295,
957 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1Mjk1",
958 | "name": "prometheus-2.28.1.openbsd-386.tar.gz",
959 | "label": "",
960 | "uploader": {
961 | "login": "prombot",
962 | "id": 18470668,
963 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
964 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
965 | "gravatar_id": "",
966 | "url": "https://api.github.com/users/prombot",
967 | "html_url": "https://github.com/prombot",
968 | "followers_url": "https://api.github.com/users/prombot/followers",
969 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
970 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
971 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
972 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
973 | "organizations_url": "https://api.github.com/users/prombot/orgs",
974 | "repos_url": "https://api.github.com/users/prombot/repos",
975 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
976 | "received_events_url": "https://api.github.com/users/prombot/received_events",
977 | "type": "User",
978 | "site_admin": false
979 | },
980 | "content_type": "application/gzip",
981 | "state": "uploaded",
982 | "size": 67673205,
983 | "download_count": 30,
984 | "created_at": "2021-07-01T16:37:02Z",
985 | "updated_at": "2021-07-01T16:37:03Z",
986 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.openbsd-386.tar.gz"
987 | },
988 | {
989 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565303",
990 | "id": 39565303,
991 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MzAz",
992 | "name": "prometheus-2.28.1.openbsd-amd64.tar.gz",
993 | "label": "",
994 | "uploader": {
995 | "login": "prombot",
996 | "id": 18470668,
997 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
998 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
999 | "gravatar_id": "",
1000 | "url": "https://api.github.com/users/prombot",
1001 | "html_url": "https://github.com/prombot",
1002 | "followers_url": "https://api.github.com/users/prombot/followers",
1003 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
1004 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
1005 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
1006 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
1007 | "organizations_url": "https://api.github.com/users/prombot/orgs",
1008 | "repos_url": "https://api.github.com/users/prombot/repos",
1009 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
1010 | "received_events_url": "https://api.github.com/users/prombot/received_events",
1011 | "type": "User",
1012 | "site_admin": false
1013 | },
1014 | "content_type": "application/gzip",
1015 | "state": "uploaded",
1016 | "size": 71009321,
1017 | "download_count": 38,
1018 | "created_at": "2021-07-01T16:37:03Z",
1019 | "updated_at": "2021-07-01T16:37:05Z",
1020 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.openbsd-amd64.tar.gz"
1021 | },
1022 | {
1023 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565306",
1024 | "id": 39565306,
1025 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MzA2",
1026 | "name": "prometheus-2.28.1.openbsd-arm64.tar.gz",
1027 | "label": "",
1028 | "uploader": {
1029 | "login": "prombot",
1030 | "id": 18470668,
1031 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
1032 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
1033 | "gravatar_id": "",
1034 | "url": "https://api.github.com/users/prombot",
1035 | "html_url": "https://github.com/prombot",
1036 | "followers_url": "https://api.github.com/users/prombot/followers",
1037 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
1038 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
1039 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
1040 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
1041 | "organizations_url": "https://api.github.com/users/prombot/orgs",
1042 | "repos_url": "https://api.github.com/users/prombot/repos",
1043 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
1044 | "received_events_url": "https://api.github.com/users/prombot/received_events",
1045 | "type": "User",
1046 | "site_admin": false
1047 | },
1048 | "content_type": "application/gzip",
1049 | "state": "uploaded",
1050 | "size": 66463463,
1051 | "download_count": 31,
1052 | "created_at": "2021-07-01T16:37:05Z",
1053 | "updated_at": "2021-07-01T16:37:07Z",
1054 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.openbsd-arm64.tar.gz"
1055 | },
1056 | {
1057 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565308",
1058 | "id": 39565308,
1059 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MzA4",
1060 | "name": "prometheus-2.28.1.openbsd-armv7.tar.gz",
1061 | "label": "",
1062 | "uploader": {
1063 | "login": "prombot",
1064 | "id": 18470668,
1065 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
1066 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
1067 | "gravatar_id": "",
1068 | "url": "https://api.github.com/users/prombot",
1069 | "html_url": "https://github.com/prombot",
1070 | "followers_url": "https://api.github.com/users/prombot/followers",
1071 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
1072 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
1073 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
1074 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
1075 | "organizations_url": "https://api.github.com/users/prombot/orgs",
1076 | "repos_url": "https://api.github.com/users/prombot/repos",
1077 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
1078 | "received_events_url": "https://api.github.com/users/prombot/received_events",
1079 | "type": "User",
1080 | "site_admin": false
1081 | },
1082 | "content_type": "application/gzip",
1083 | "state": "uploaded",
1084 | "size": 65737353,
1085 | "download_count": 33,
1086 | "created_at": "2021-07-01T16:37:07Z",
1087 | "updated_at": "2021-07-01T16:37:08Z",
1088 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.openbsd-armv7.tar.gz"
1089 | },
1090 | {
1091 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565310",
1092 | "id": 39565310,
1093 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MzEw",
1094 | "name": "prometheus-2.28.1.windows-386.tar.gz",
1095 | "label": "",
1096 | "uploader": {
1097 | "login": "prombot",
1098 | "id": 18470668,
1099 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
1100 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
1101 | "gravatar_id": "",
1102 | "url": "https://api.github.com/users/prombot",
1103 | "html_url": "https://github.com/prombot",
1104 | "followers_url": "https://api.github.com/users/prombot/followers",
1105 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
1106 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
1107 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
1108 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
1109 | "organizations_url": "https://api.github.com/users/prombot/orgs",
1110 | "repos_url": "https://api.github.com/users/prombot/repos",
1111 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
1112 | "received_events_url": "https://api.github.com/users/prombot/received_events",
1113 | "type": "User",
1114 | "site_admin": false
1115 | },
1116 | "content_type": "application/gzip",
1117 | "state": "uploaded",
1118 | "size": 69567766,
1119 | "download_count": 31,
1120 | "created_at": "2021-07-01T16:37:09Z",
1121 | "updated_at": "2021-07-01T16:37:10Z",
1122 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.windows-386.tar.gz"
1123 | },
1124 | {
1125 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565311",
1126 | "id": 39565311,
1127 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MzEx",
1128 | "name": "prometheus-2.28.1.windows-386.zip",
1129 | "label": "",
1130 | "uploader": {
1131 | "login": "prombot",
1132 | "id": 18470668,
1133 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
1134 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
1135 | "gravatar_id": "",
1136 | "url": "https://api.github.com/users/prombot",
1137 | "html_url": "https://github.com/prombot",
1138 | "followers_url": "https://api.github.com/users/prombot/followers",
1139 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
1140 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
1141 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
1142 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
1143 | "organizations_url": "https://api.github.com/users/prombot/orgs",
1144 | "repos_url": "https://api.github.com/users/prombot/repos",
1145 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
1146 | "received_events_url": "https://api.github.com/users/prombot/received_events",
1147 | "type": "User",
1148 | "site_admin": false
1149 | },
1150 | "content_type": "application/zip",
1151 | "state": "uploaded",
1152 | "size": 70888326,
1153 | "download_count": 169,
1154 | "created_at": "2021-07-01T16:37:11Z",
1155 | "updated_at": "2021-07-01T16:37:12Z",
1156 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.windows-386.zip"
1157 | },
1158 | {
1159 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565314",
1160 | "id": 39565314,
1161 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MzE0",
1162 | "name": "prometheus-2.28.1.windows-amd64.tar.gz",
1163 | "label": "",
1164 | "uploader": {
1165 | "login": "prombot",
1166 | "id": 18470668,
1167 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
1168 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
1169 | "gravatar_id": "",
1170 | "url": "https://api.github.com/users/prombot",
1171 | "html_url": "https://github.com/prombot",
1172 | "followers_url": "https://api.github.com/users/prombot/followers",
1173 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
1174 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
1175 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
1176 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
1177 | "organizations_url": "https://api.github.com/users/prombot/orgs",
1178 | "repos_url": "https://api.github.com/users/prombot/repos",
1179 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
1180 | "received_events_url": "https://api.github.com/users/prombot/received_events",
1181 | "type": "User",
1182 | "site_admin": false
1183 | },
1184 | "content_type": "application/gzip",
1185 | "state": "uploaded",
1186 | "size": 71617768,
1187 | "download_count": 182,
1188 | "created_at": "2021-07-01T16:37:13Z",
1189 | "updated_at": "2021-07-01T16:37:14Z",
1190 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.windows-amd64.tar.gz"
1191 | },
1192 | {
1193 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565317",
1194 | "id": 39565317,
1195 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MzE3",
1196 | "name": "prometheus-2.28.1.windows-amd64.zip",
1197 | "label": "",
1198 | "uploader": {
1199 | "login": "prombot",
1200 | "id": 18470668,
1201 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
1202 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
1203 | "gravatar_id": "",
1204 | "url": "https://api.github.com/users/prombot",
1205 | "html_url": "https://github.com/prombot",
1206 | "followers_url": "https://api.github.com/users/prombot/followers",
1207 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
1208 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
1209 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
1210 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
1211 | "organizations_url": "https://api.github.com/users/prombot/orgs",
1212 | "repos_url": "https://api.github.com/users/prombot/repos",
1213 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
1214 | "received_events_url": "https://api.github.com/users/prombot/received_events",
1215 | "type": "User",
1216 | "site_admin": false
1217 | },
1218 | "content_type": "application/zip",
1219 | "state": "uploaded",
1220 | "size": 72542968,
1221 | "download_count": 6382,
1222 | "created_at": "2021-07-01T16:37:15Z",
1223 | "updated_at": "2021-07-01T16:37:16Z",
1224 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.windows-amd64.zip"
1225 | },
1226 | {
1227 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/assets/39565318",
1228 | "id": 39565318,
1229 | "node_id": "MDEyOlJlbGVhc2VBc3NldDM5NTY1MzE4",
1230 | "name": "sha256sums.txt",
1231 | "label": "",
1232 | "uploader": {
1233 | "login": "prombot",
1234 | "id": 18470668,
1235 | "node_id": "MDQ6VXNlcjE4NDcwNjY4",
1236 | "avatar_url": "https://avatars.githubusercontent.com/u/18470668?v=4",
1237 | "gravatar_id": "",
1238 | "url": "https://api.github.com/users/prombot",
1239 | "html_url": "https://github.com/prombot",
1240 | "followers_url": "https://api.github.com/users/prombot/followers",
1241 | "following_url": "https://api.github.com/users/prombot/following{/other_user}",
1242 | "gists_url": "https://api.github.com/users/prombot/gists{/gist_id}",
1243 | "starred_url": "https://api.github.com/users/prombot/starred{/owner}{/repo}",
1244 | "subscriptions_url": "https://api.github.com/users/prombot/subscriptions",
1245 | "organizations_url": "https://api.github.com/users/prombot/orgs",
1246 | "repos_url": "https://api.github.com/users/prombot/repos",
1247 | "events_url": "https://api.github.com/users/prombot/events{/privacy}",
1248 | "received_events_url": "https://api.github.com/users/prombot/received_events",
1249 | "type": "User",
1250 | "site_admin": false
1251 | },
1252 | "content_type": "text/plain; charset=utf-8",
1253 | "state": "uploaded",
1254 | "size": 3632,
1255 | "download_count": 3037,
1256 | "created_at": "2021-07-01T16:37:16Z",
1257 | "updated_at": "2021-07-01T16:37:17Z",
1258 | "browser_download_url": "https://github.com/prometheus/prometheus/releases/download/v2.28.1/sha256sums.txt"
1259 | }
1260 | ],
1261 | "tarball_url": "https://api.github.com/repos/prometheus/prometheus/tarball/v2.28.1",
1262 | "zipball_url": "https://api.github.com/repos/prometheus/prometheus/zipball/v2.28.1",
1263 | "body": "* [BUGFIX]: HTTP SD: Allow `charset` specification in `Content-Type` header. #8981\r\n* [BUGFIX]: HTTP SD: Fix handling of disappeared target groups. #9019\r\n* [BUGFIX]: Fix incorrect log-level handling after moving to go-kit/log. #9021\r\n",
1264 | "reactions": {
1265 | "url": "https://api.github.com/repos/prometheus/prometheus/releases/45574049/reactions",
1266 | "total_count": 19,
1267 | "+1": 2,
1268 | "-1": 0,
1269 | "laugh": 0,
1270 | "hooray": 0,
1271 | "confused": 0,
1272 | "heart": 0,
1273 | "rocket": 17,
1274 | "eyes": 0
1275 | }
1276 | }
1277 |
--------------------------------------------------------------------------------
/tests/fixtures/test.txt.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jooola/gh-release-install/33809112c020ae83dccc2f11caa5e90d3c65c182/tests/fixtures/test.txt.bz2
--------------------------------------------------------------------------------
/tests/main_test.py:
--------------------------------------------------------------------------------
1 | # pylint: disable=protected-access
2 |
3 | from __future__ import annotations
4 |
5 | import json
6 | from pathlib import Path
7 |
8 | from gh_release_install import GhReleaseInstall
9 |
10 |
11 | def _load_json_fixture(path: str) -> dict:
12 | raw = Path(path).read_text(encoding="utf-8")
13 | return json.loads(raw)
14 |
15 |
16 | def test_installer_get_target_version_latest(
17 | requests_mock,
18 | installer: GhReleaseInstall,
19 | ):
20 | requests_mock.get(
21 | "https://api.github.com/repos/prometheus/prometheus/releases/latest",
22 | json=_load_json_fixture("tests/fixtures/gh_releases_latest.json"),
23 | )
24 | installer._get_target_version()
25 |
26 | assert installer._target is not None
27 | assert installer._target.tag == "v2.28.1"
28 | assert installer._target.version == "2.28.1"
29 |
30 |
31 | def test_installer_get_target_version_fixed(installer: GhReleaseInstall):
32 | installer._version = "v2.28.1"
33 | installer._get_target_version()
34 |
35 | assert installer._target is not None
36 | assert installer._target.tag == "v2.28.1"
37 | assert installer._target.version == "2.28.1"
38 |
39 |
40 | def test_installer_get_local_version(
41 | tmp_path: Path,
42 | installer: GhReleaseInstall,
43 | ):
44 | installer._destination = str(tmp_path / "prometheus")
45 | installer._version_file = "{destination}.version"
46 |
47 | installer._get_local_version()
48 |
49 | assert installer._local is None
50 |
51 |
52 | def test_installer_get_local_version_exists(
53 | tmp_path: Path,
54 | installer: GhReleaseInstall,
55 | ):
56 | installer._destination = str(tmp_path / "prometheus")
57 | installer._version_file = "{destination}.version"
58 |
59 | tmp_version_file = installer.version_file
60 | assert tmp_version_file is not None
61 | tmp_version_file.write_text("v2.28.1")
62 |
63 | installer._get_local_version()
64 |
65 | assert installer._local is not None
66 | assert installer._local.tag == "v2.28.1"
67 | assert installer._local.version == "2.28.1"
68 |
--------------------------------------------------------------------------------
/tests/unpack_test.py:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 |
3 | from pathlib import Path
4 |
5 | from gh_release_install.unpack import _unpack_bz2
6 |
7 | here = Path(__file__).parent
8 |
9 |
10 | def test_unpack_bz2(tmp_path):
11 | src = Path(here / "fixtures/test.txt.bz2")
12 | dest = Path(tmp_path / "test.txt")
13 |
14 | _unpack_bz2(src, tmp_path)
15 |
16 | assert dest.is_file
17 | assert dest.read_text(encoding="utf-8") == "Hello World\n"
18 |
--------------------------------------------------------------------------------