File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -67,23 +67,24 @@ elif ! [ "$DOCKER_EXIST" ] && [ "$PODMAN_EXIST" ]; then
67
67
CONTAINER_ENGINE=" podman"
68
68
fi
69
69
70
- # Install the sdk using docker
71
- ${CONTAINER_ENGINE} run --rm \
70
+ # Install the sdk using docker, using the user that is running the container engine so that files can still be removed
71
+ ${CONTAINER_ENGINE} run --user $( id -u ) : $( id -g ) -- rm \
72
72
-v " ${repo_root} " :/local docker.io/openapitools/openapi-generator-cli generate \
73
73
-i /local/" ${SWAGGER_CODEGEN_FILE} " \
74
74
-g python \
75
75
-o /local/" ${SDK_OUTPUT_PATH} " \
76
- -c local/" ${SWAGGER_CODEGEN_FILE} "
77
-
78
- if [ -d " docker-17.03.0-ce.tgz" ]; then
79
- echo " Removing docker install folder"
80
- rm -r docker-17.03.0-ce.tgz
81
- fi
76
+ -c local/" ${SWAGGER_CODEGEN_CONF} "
82
77
83
78
echo " Running post-generation script ..."
84
79
" ${repo_root} " /hack/python-sdk/post_gen.py
85
80
86
81
echo " JobSet Python SDK is generated successfully to folder ${SDK_OUTPUT_PATH} /."
87
82
88
83
# Remove setup.py
89
- rm ${SDK_OUTPUT_PATH} /setup.py
84
+ rm " ${SDK_OUTPUT_PATH} " /setup.py
85
+
86
+ # Clean up
87
+ if [ -d " docker-17.03.0-ce.tgz" ]; then
88
+ echo " Removing docker install folder"
89
+ rm -r docker-17.03.0-ce.tgz
90
+ fi
You can’t perform that action at this time.
0 commit comments