Building update packages requires external assets located on external repositories releases pages, in specific versions for specified products. The tool automates downloading such assets.
download_asset.pyThe tool can be used to:
The tool uses argparse to provide CLI and the best user experience.
Please see download_asset.py --help for up to date parameters use and documentation
To use GitHub API your GitHub login and special token (API password) are required. This token can by generated on "User" -> Settings page in section Developer settings -> Personal acces tokens section. For more info please refer to the Github help page about adding tokens: Creating a personal access token
When you generate a token you can set "Scopes" for which the token will work. For downloading assets, we need a ":repo" scope with all sub-scopes.
Note: Tokens are displayed only during their creation, so this is the only moment you can copy them. If you forget to do this, you will have to generate a new token.
Note: With token added please double check it's working before issuing not working toolkit as most of the problems lies with no, or improper configuration.
The download_assets.py file can have login and password passed through parameters,
or this data can be stored in your current git repository configuration.
Adding GitHub login to:
git config --add user.githublogin <login>
Adding API Token:
git config --add user.apitoken
Checking the values:
git config user.githublogin
git config user.apitoken
git config user.apitoken
if not please add token ( see doc: documentation
curl -o /dev/null -H "Authorization: token $(git config user.apitoken)" "https://api.github.com/repos/mudita/PureUpdater"
if not Then please either fix your token access or request access to the PureUpdater
python3 ./tools/download_asset.py github --repository PureUpdater list
if not Then fix your token, or request access to PureUpdater