File tree 1 file changed +21
-3
lines changed
1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,28 @@ echo "Removing previously generated files ..."
42
42
rm -rf " ${SDK_OUTPUT_PATH} " /docs/V1* .md " ${SDK_OUTPUT_PATH} " /jobset/models " ${SDK_OUTPUT_PATH} " /test/test_* .py
43
43
44
44
echo " Generating Python SDK for JobSet..."
45
+
46
+
47
+ # Defaults the container engine to docker
48
+ CONTAINER_ENGINE=${CONTAINER_ENGINE:- docker}
49
+ # Checking if docker / podman is installed
50
+ if ! { [ $( command -v docker & > /dev/null) ] && [ $( command -v podman & > /dev/null) ] }; then
51
+ # Install docker
52
+ echo " Both Podman and Docker is not installed"
53
+ echo " Installing Docker now (Version 17.03.0)"
54
+ # Defaulting to 17.03.0
55
+ wget https://download.docker.com/linux/static/stable/x86_64/docker-17.03.0-ce.tgz
56
+ tar xzvf docker-17.03.0-ce.tgz
57
+ echo " Starting dockerd"
58
+ ./docker/dockerd &
59
+ elif [ ` command -v podman & > /dev/null` ]; then
60
+ echo " Found that Podman is installed, using that now"
61
+ CONTAINER_ENGINE=" podman"
62
+ fi
63
+
45
64
# Install the sdk using docker
46
- docker run --rm \
47
- # Hooking up the whole repo onto the local folder
48
- -v " ${repo_root} " :/local openapitools/openapi-generator-cli generate \
65
+ ${CONTAINER_ENGINE} run --rm \
66
+ -v docker.io/" ${repo_root} " :/local openapitools/openapi-generator-cli generate \
49
67
-i /local/${SWAGGER_CODEGEN_FILE} \
50
68
-g python \
51
69
-o /local/" ${SDK_OUTPUT_PATH} " \
You can’t perform that action at this time.
0 commit comments