Skip to content

Commit 2843c4d

Browse files
committed
keep the update for gen-sdk.sh
1 parent 1642539 commit 2843c4d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

hack/python-sdk/gen-sdk.sh

+10-9
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,24 @@ elif ! [ "$DOCKER_EXIST" ] && [ "$PODMAN_EXIST" ]; then
6767
CONTAINER_ENGINE="podman"
6868
fi
6969

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 \
7272
-v "${repo_root}":/local docker.io/openapitools/openapi-generator-cli generate \
7373
-i /local/"${SWAGGER_CODEGEN_FILE}" \
7474
-g python \
7575
-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}"
8277

8378
echo "Running post-generation script ..."
8479
"${repo_root}"/hack/python-sdk/post_gen.py
8580

8681
echo "JobSet Python SDK is generated successfully to folder ${SDK_OUTPUT_PATH}/."
8782

8883
# 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

0 commit comments

Comments
 (0)