milkv-duo / duo-arduino

GNU Lesser General Public License v2.1
15 stars 8 forks source link

optimize the release script #14

Closed bekcpear closed 5 months ago

bekcpear commented 5 months ago

optimize the release script

  1. reuse the json data which stored on the project release page
  2. insert new data before to the current latest released index json file
  3. about config.json file
    • it's the configuration file for the current release version
    • the "basicInfo" object is repository releated
    • the "ignoredVersions" is currently unimplemented
    • the "current" object is about the current package info, these data are used to generate "platforms" and "tools" items in the index json file.
      • the '"source": "external|internel"' record within the "toolsDependencies" array is used to determine the dependency which should be generated locally or can just download from the internet. "internel" source should always include the "path" to let the script known where the tool located, relative to path of this repository. "internet" source tools should not contain the "url", "checksum", and "size" records, these are generated automatically.
  4. the actions required for each version updates are usually:
    1. change config.json->current->version to the current arduino-sophgo version
    2. check the toolsDependencies should be modified or not and do the proper modification (burntool version bump, new deps, etc.).
    3. export GITHUB_TOKEN= # due to the api limits
    4. run ./package/release.sh
    5. the script will try to download the latest index json file from the release page of this repository, and update it; if it failed getting the download url of index json file, the script will create a fresh index json file which doesn't contains the previous versions.
    6. the generated compressed packages and the updated/fresh index json file will be saved in the parent directory of this repository. or, you can specify the directory storing the generated file with environment variable WORKDIR.