Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): Simplify config and data dir parsing #19

Merged
merged 6 commits into from
Nov 26, 2018

Commits on Nov 22, 2018

  1. feat(config): Simplify config and data dir parsing

    BREAKING CHANGE:
    
    Command line arguments and some config options and chan spec options have been
    changed. It may break scripts and integration tests that depends on the
    command line interface.
    
    - Command line argument `--config|-c` is now a top option, which should be
      specified before sub-command.
    - Remove command line arguments `--data-dir` and `--chain`. They should be
      configured via the config file.
    - Add a new config option `data_dir`, which configures the path of data
      directory.
    - Option `ckb.chain` now only accepts a path.
    - Option `system_cells` in chain spec now only accepts paths.
    
    The path `data_dir` and `ckb.chain` can be an absolute path, or relative to
    the directory containing the config file.
    
    The paths of `system_cells` in chain spec can be absolute, or relative to the
    directory containing the chain spec file.
    
    If `--config|-c` is omitted, the app tries `ckb.json`, `nodes/default.json` in
    order.
    
    It is recommended to use `nodes/default.json` for development, which can be
    created by copying `nodes/default.example.json`. The default config saves data
    in `nodes/default/`, and loads chains spec `nodes/spec/dev.json`.
    
    Following locations are obsoleted data directories, which can be removed on
    development machines:
    
    - Linux
      - `$XDG_DATA_HOME/ckb`
      - `$XDG_DATA_HOME/NervosDev`
      - `$HOME/.local/share/ckb`
      - `$HOME/.local/share/NervosDev`
    - macOS
      - `$HOME/Library/Application Support/ckb`
      - `$HOME/Library/Application Support/NervosDev`
    doitian committed Nov 22, 2018
    Configuration menu
    Copy the full SHA
    ff6df78 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2018

  1. Configuration menu
    Copy the full SHA
    7797f03 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2018

  1. Configuration menu
    Copy the full SHA
    cec17c2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    16c6a1a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3101d46 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a675482 View commit details
    Browse the repository at this point in the history