Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project-help:
@$(SCRIPTS_BASE)/project.sh help

project-tools:
@$(SCRIPTS_BASE)/project.sh tools
@$(SCRIPTS_BASE)/project.sh tools "$(LANGUAGE)"

# GENERATE
download-oas:
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-sdk/languages/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ generate_python_sdk() {

# Install SDK project tools
cd ${ROOT_DIR}
make project-tools
make project-tools LANGUAGE=python

# Backup of the current state of the SDK services dir (services/)
sdk_services_backup_dir=$(mktemp -d)
Expand Down
17 changes: 14 additions & 3 deletions scripts/project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@ SDK_PATH="${ROOT_DIR}/sdk"

action=$1

if [[ -z $2 ]]; then
echo "LANGUAGE not specified, default will be used."
LANGUAGE="go"
else
LANGUAGE=$2
fi

if [ "$action" = "help" ]; then
[ -f "$0".man ] && man "$0".man || echo "No help, please read the script in ${script}, we will add help later"
elif [ "$action" = "tools" ]; then
cd ${ROOT_DIR}

go install golang.org/x/tools/cmd/goimports@latest
pip install black==24.8.0 isort~=5.13.2 autoimport~=1.6.1
if [ "${LANGUAGE}" == "go" ]; then
go install golang.org/x/tools/cmd/goimports@latest
elif [ "${LANGUAGE}" == "python" ]; then
pip install black==24.8.0 isort~=5.13.2 autoimport~=1.6.1
else
echo "Invalid language: `$LANGUAGE`, please use $0 help for help"
fi
else
echo "Invalid action: '$action', please use $0 help for help"
fi
Loading