File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ project-help:
66 @$(SCRIPTS_BASE ) /project.sh help
77
88project-tools :
9- @$(SCRIPTS_BASE ) /project.sh tools
9+ @$(SCRIPTS_BASE ) /project.sh tools " $( LANGUAGE ) "
1010
1111# GENERATE
1212download-oas :
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ generate_python_sdk() {
5858
5959 # Install SDK project tools
6060 cd ${ROOT_DIR}
61- make project-tools
61+ make project-tools LANGUAGE=python
6262
6363 # Backup of the current state of the SDK services dir (services/)
6464 sdk_services_backup_dir=$( mktemp -d)
Original file line number Diff line number Diff line change @@ -11,13 +11,24 @@ SDK_PATH="${ROOT_DIR}/sdk"
1111
1212action=$1
1313
14+ if [[ -z $2 ]]; then
15+ echo " LANGUAGE not specified, default will be used."
16+ LANGUAGE=" go"
17+ else
18+ LANGUAGE=$2
19+ fi
20+
1421if [ " $action " = " help" ]; then
1522 [ -f " $0 " .man ] && man " $0 " .man || echo " No help, please read the script in ${script} , we will add help later"
1623elif [ " $action " = " tools" ]; then
1724 cd ${ROOT_DIR}
18-
19- go install golang.org/x/tools/cmd/goimports@latest
20- pip install black==24.8.0 isort~=5.13.2 autoimport~=1.6.1
25+ if [ " ${LANGUAGE} " == " go" ]; then
26+ go install golang.org/x/tools/cmd/goimports@latest
27+ elif [ " ${LANGUAGE} " == " python" ]; then
28+ pip install black==24.8.0 isort~=5.13.2 autoimport~=1.6.1
29+ else
30+ echo " Invalid language: ` $LANGUAGE ` , please use $0 help for help"
31+ fi
2132else
2233 echo " Invalid action: '$action ', please use $0 help for help"
2334fi
You can’t perform that action at this time.
0 commit comments