File tree 1 file changed +33
-6
lines changed
1 file changed +33
-6
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,44 @@ This repository decouples the `influx` CLI from the OSS `influxdb` codebase. Our
9
9
2 . Enable faster turn-around on fixes/features that only affect the CLI
10
10
3 . Allow the CLI to be built & released for a wider range of platforms than the server can support
11
11
12
- ## Building
12
+ ## Building the CLI
13
13
14
- Run ` make ` or ` make influx ` to build the CLI. The output binary will be written to ` bin/$(GOOS)/influx ` .
14
+ Follow these steps to build the CLI. If you're updating your CLI build, see * Updating openapi* below.
15
+ 1 . Clone this repo (influx-cli) and change to your _ influx-cli_ directory.
15
16
16
- ### Regenerating OpenAPI client
17
+ ```
18
+ git clone [email protected] :influxdata/influx-cli.git
19
+ cd influx-cli
20
+ ```
21
+
22
+ 2 . Build the CLI. The ` make ` and ` make influx ` commands write the new binary to ` bin/$(GOOS)/influx ` .
23
+
24
+ ```
25
+ make
26
+ ```
27
+
28
+ ### Updating openapi
17
29
30
+ If you change or update your branch, you may also need to update ` influx-cli/openapi ` and regenerate the client code.
31
+ ` influx-cli/openapi ` is a Git submodule that contains the underlying API contracts and client used by the CLI.
18
32
We use [ ` OpenAPITools/openapi-generator ` ] ( https://github.com/OpenAPITools/openapi-generator ) to generate
19
- the underlying HTTP client used by the CLI. Run ` make openapi ` to re-generate the code. You'll need Docker
20
- running locally for the script to work.
33
+ the HTTP client.
21
34
22
- ## Running
35
+ To update, run the following commands in your ` influx-cli ` repo:
36
+
37
+ 1 . Update the _ openapi_ Git submodule. The following command pulls the latest commits for the branch and all submodules.
38
+
39
+ ` git pull --recurse-submodules `
40
+
41
+ 2 . With [ Docker] ( https://docs.docker.com/get-docker/ ) running locally, regenerate _ openapi_ .
42
+
43
+ ` make openapi `
44
+
45
+ 3 . Rebuild the CLI
46
+
47
+ ` make `
48
+
49
+ ## Running the CLI
23
50
24
51
After building, use ` influx -h ` to see the list of available commands.
25
52
You can’t perform that action at this time.
0 commit comments