zhongjiajie commented on issue #9321: URL: https://github.com/apache/dolphinscheduler/issues/9321#issuecomment-1091456723
> However for the first point, if there are images of unexpected types, assertion will fail right away. Therefore, we only need to remove images not referenced in the docs directory. Please correct me if I get it wrong. Good catch, you're right. Maybe we only need to dynamic get `expect_img_types` from `docs` directory https://github.com/apache/dolphinscheduler/blob/9f84dbbda00956d5bf198ce7eb4c47f2ea335173/docs/img_utils.py#L35-L38 , cause we need if for finding all docs imgs in https://github.com/apache/dolphinscheduler/blob/9f84dbbda00956d5bf198ce7eb4c47f2ea335173/docs/img_utils.py#L123-L124 but now it is hard code. When we add new img type like `*.svg`, we can not get svg path in `docs` by https://github.com/apache/dolphinscheduler/blob/9f84dbbda00956d5bf198ce7eb4c47f2ea335173/docs/img_utils.py#L123-L124 cause our function `build_pattern` do not get it from directory `docs`, and sub command `prune` will remove `*.svg` file when I run it. For now I have to add `svg` into `expect_img_types` to fix this -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
