e Download Assets
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. It has to have at least read access to repositories.
For more info please refer to the Github help page about adding tokens: github documentation: 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 if it's working before issuing not working toolkit as most of the problems lies with no, or improper configuration.
The download_assets.py loads authorization data via git configuration.
The process requires that this data is stored in your current repository or global git configuration.
To do so: Add you github login to the git config:
git config --add user.githublogin Your_Github_Login_Here
Add token to your global git config on PC
git config --add --global user.apitoken Your_Generated_Token_Value_Here
To see the values run:
git config user.githublogin
git config user.apitoken
git config user.apitoken
if not please add the 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