ungurnicoleta / brave-versions

Generate an easily queryable metadata set about Brave releases

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

brave-versions

Generate an easily queryable JSON dataset about Brave public releases

This script stitches together data about public Brave releases from Github and the package.json data from brave-browser to produce a central dataset about Brave versions.

Getting started

Dependencies

Clone and install dependencies

git clone https://github.com/marshall/brave-versions
cd brave-versions

nvm use
yarn install

Run brave-versions

yarn run brave-versions

By default generated json is written to brave-versions.json

Configuration

Configuration is currently done through command line switches and environment variables / dotenv.

Command line

$ brave-versions --help
Usage: brave-versions [options]

Options:
  -V, --version            output the version number
  --brave-browser <dir>    existing brave-browser git repo (default: "/Users/marshall/.brave-versions/brave-browser")
  --cache-dir <dir>        cache in dir (default: "/Users/marshall/.brave-versions")
  --cache-github-releases  enable cached github releases (default: false)
  --no-git-pull            skip git pull in brave-browser (default: git pull to update)
  -o, --output <file>      path to output json manifest (default: brave-versions.json)
  -h, --help               display help for command

Environment Variables

Name Description
BRAVE_VERSIONS_DIR path where data is cached, by default this is $HOME/.brave-versions
GITHUB_TOKEN optional authorization token for Github API (use to raise the Github API rate limit)

Data format

The manifest generated by brave-versions is a JSON file with the following general structure:

{
  "<git tag>": {
    "tag": "<git tag>",
    "name": "<version name>",
    "channel": "stable|beta|nightly|dev",
    "commit": "<git sha>",
    "published": "<release publish date/time>",
    "dependencies": {
      "chrome": "<chrome version>"
    },
    "github": {
      "release_id": "<github release id>",
      "assets": [
        {
          "id": "<github asset id>",
          "name": "<filename>",
          "download_url": "<github download url>"
        },
        //...
      ]
    }
  },
  //...
}

About

Generate an easily queryable metadata set about Brave releases

License:Mozilla Public License 2.0


Languages

Language:JavaScript 100.0%