From 5dc47d2ff59c64f70edccba03bd55ceabcad8d60 Mon Sep 17 00:00:00 2001 From: shahidhk Date: Thu, 28 Jun 2018 11:35:34 +0530 Subject: [PATCH] [cli] commit realize, update docs --- cli/.gitignore | 2 +- cli/.realize/realize.yaml | 42 +++++++++++++++++++++++++++++++++++++++ cli/CONTRIBUTING.md | 21 +++++++++++++++++++- cli/README.md | 2 +- cli/docs/README.md | 3 +++ 5 files changed, 67 insertions(+), 3 deletions(-) create mode 100755 cli/.realize/realize.yaml create mode 100644 cli/docs/README.md diff --git a/cli/.gitignore b/cli/.gitignore index 8d6052b0..41609f58 100644 --- a/cli/.gitignore +++ b/cli/.gitignore @@ -1,4 +1,4 @@ vendor/ vendor.orig/ -.realize _output/ +*.temp diff --git a/cli/.realize/realize.yaml b/cli/.realize/realize.yaml new file mode 100755 index 00000000..6199a172 --- /dev/null +++ b/cli/.realize/realize.yaml @@ -0,0 +1,42 @@ +settings: + files: + outputs: + status: false + name: outputs.log + logs: + status: false + name: logs.log + errors: + status: false + name: errors.log + legacy: + force: false + interval: 100ms +server: + status: false + open: false + port: 5001 + host: localhost +schema: +- name: hasura-graphql-engine + path: cmd/hasura + commands: + install: + status: true + watcher: + paths: + - / + - ../../ + extensions: + - go + ignored_paths: + - ../../.git + - ../../.realize + - ../../vendor + - ../../docs + - ../../build + - ../../vendor.orig + scripts: + - type: after + command: go run hasura.go docs --type md --directory ../../docs + output: true diff --git a/cli/CONTRIBUTING.md b/cli/CONTRIBUTING.md index ee45d241..e727c717 100644 --- a/cli/CONTRIBUTING.md +++ b/cli/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to Hasura GraphQL Engine CLI +# Contributing You can follow your existing Golang workflow to fork, work on a branch and submit PR. If you're new to forking and working on Golang repositories, please @@ -9,7 +9,26 @@ follow the instructions below to make sure the import paths are correct. - `cd $GOPATH/src/github.com/hasura` - `git clone https://github.com//graphql-engine` - `cd graphql-engine` +- `git remote add upstream https://github.com/hasura/graphql-engine` - `git checkout -b ` - Work on the feature/fix - Add tests and ensure all tests are passing (`make test`) - Commit, push and submit PR + +## Development workflow + +We suggest using [realize](https://github.com/oxequa/realize) for faster dev +workflow. The `.realize` config is already included in the repo. + +- Install realize + ```bash + go get github.com/oxequa/realize + ``` +- Start realize + ```bash + realize start + ``` + +`realize` watches the directory for changes and rebuilds the cli whenever a new +change happens. The cli is installed to `$GOPATH/bin/hasura`, which should +already be in your `PATH`. The config is located at `.realize/realize.yaml`. diff --git a/cli/README.md b/cli/README.md index 96cddf7d..e9d8cbb7 100644 --- a/cli/README.md +++ b/cli/README.md @@ -30,4 +30,4 @@ Read complete docs [here](docs/hasura.md). ## Contributing -Checkout the [contributing guide](CONTRIBUTING.md) +Checkout the [contributing guide](CONTRIBUTING.md). diff --git a/cli/docs/README.md b/cli/docs/README.md new file mode 100644 index 00000000..4f4aea50 --- /dev/null +++ b/cli/docs/README.md @@ -0,0 +1,3 @@ +# Hasura GraphQL Engine CLI Docs + +Follow [hasura](hasura.md).