File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ #
4
+ # How to run script from ROOT path:
5
+ # docker run --rm -it -v "${PWD}":/code/client -v ~/.m2:/root/.m2 -w /code maven:3-openjdk-8 /code/client/scripts/generate-sources.sh
6
+ #
7
+
8
+ #
9
+ # Download customized generator
10
+ #
11
+ git clone --single-branch --branch master https://github.com/bonitoo-io/influxdb-clients-apigen " /code/influxdb-clients-apigen"
12
+ mkdir -p /code/influxdb-clients-apigen/build/
13
+ ln -s /code/client /code/influxdb-clients-apigen/build/influxdb-client-python
14
+ cd /code/influxdb-clients-apigen/
15
+
16
+ #
17
+ # Download APIs contracts
18
+ #
19
+ wget https://raw.githubusercontent.com/influxdata/openapi/master/contracts/oss.yml -O " /code/influxdb-clients-apigen/oss.yml"
20
+ wget https://raw.githubusercontent.com/influxdata/openapi/master/contracts/cloud.yml -O " /code/influxdb-clients-apigen/cloud.yml"
21
+ wget https://raw.githubusercontent.com/influxdata/openapi/master/contracts/invocable-scripts.yml -O " /code/influxdb-clients-apigen/invocable-scripts.yml"
22
+
23
+ #
24
+ # Build generator
25
+ #
26
+ mvn -DskipTests -f /code/influxdb-clients-apigen/openapi-generator/pom.xml clean install
27
+
28
+ #
29
+ # Prepare customized contract
30
+ #
31
+ mvn -f /code/influxdb-clients-apigen/openapi-generator/pom.xml compile exec:java -Dexec.mainClass=" com.influxdb.AppendCloudDefinitions" -Dexec.args=" oss.yml cloud.yml"
32
+ mvn -f /code/influxdb-clients-apigen/openapi-generator/pom.xml compile exec:java -Dexec.mainClass=" com.influxdb.MergeContracts" -Dexec.args=" oss.yml invocable-scripts.yml"
33
+
34
+ #
35
+ # Generate sources
36
+ #
37
+ ./generate-python.sh
You can’t perform that action at this time.
0 commit comments