Changeset 2052b72 for buildhelpers
- Timestamp:
- Apr 19, 2020, 6:23:15 PM (7 years ago)
- Branches:
- debian/bullseye, master
- Children:
- 24a7f16
- Parents:
- b240fb0
- File:
-
- 1 edited
-
buildhelpers/code_generator (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
buildhelpers/code_generator
rb240fb0 r2052b72 8 8 PACKAGE_VERSION="0.5.90" 9 9 TARGET_TMP="${SRC_GEN}/${PACKAGE_NAME}_tmp/" 10 #CELERY_WORKER_SCRIPT="${SRC_GEN}/celery_worker"11 10 12 11 echo "Cleaning directory" … … 20 19 echo "Preparing symlinks" 21 20 mkdir -p "${TARGET_TMP}" 22 #cd "${TARGET}"23 #mkdir -p server_impl24 #cp -a ../../server_impl/* server_impl/25 21 26 #echo "Copying static files" 27 #mkdir -p templates 28 #cp -a ../../templates/* templates/ 29 30 echo "Generating backend and client API code" 31 #cd ../../ 32 # backend 22 echo "Generating backend API code" 33 23 ${DIR}/codegen/openapi-generator-cli generate -i "${SRC}/mapservice.yaml" -g python-flask -t "${DIR}/codegen/templates/" --additional-properties=packageVersion=${PACKAGE_VERSION},packageName=${PACKAGE_NAME_GEN} -o "${TARGET_TMP}" 34 24 mv "${TARGET_TMP}/gnuboat/${PACKAGE_NAME}" "${SRC_GEN}/${PACKAGE_NAME}" … … 38 28 echo "Formatting the generated code accoring to style file" 39 29 yapf --style "python-style.yapf" -r -i "${SRC_GEN}/${PACKAGE_NAME}" 40 41 # client42 #codegen/openapi-generator-cli generate -i openapi.yaml -g javascript -o src-gen/openapi_server/static/43 #rm -R src-gen/openapi_server/static/.openapi*44 45 # copying tests into auto generated test directory with test base class46 #cp -a tests/* src-gen/${PACKAGE_NAME}/test/47 48 ########49 #50 # Adding additional files to src-gen directory51 #52 ########53 # echo "#!/bin/bash" > "${CELERY_WORKER_SCRIPT}"54 # echo 'export FLASK_ENV="development"' >> "${CELERY_WORKER_SCRIPT}"55 # echo "celery -A ${PACKAGE_NAME}_impl.CeleryWorker:celery worker -l info -E -B" >> "${CELERY_WORKER_SCRIPT}"56 # chmod +x "${CELERY_WORKER_SCRIPT}"57 #58 # # bash script to install gnuboat_common from this repository before other dependencies59 # echo "#!/bin/bash" > "${TOX_INSTALL_COMMAND}"60 # echo 'pip install --editable=file:///`pwd`/../../common' >> "${TOX_INSTALL_COMMAND}"61 # echo 'pip install $@' >> "${TOX_INSTALL_COMMAND}"62 # chmod 0755 "${TOX_INSTALL_COMMAND}"63 # # create coverage configuration64 # COVERAGERC_FILE="${SRC_GEN}/.coveragerc"65 # echo "[run]" >> "${COVERAGERC_FILE}"66 # echo "branch = True" >> "${COVERAGERC_FILE}"67 # echo "omit = *test*" >> "${COVERAGERC_FILE}"68 #69 # # create MANIFEST.in to package openapi-spec and templates70 # echo "include gnuboat_mapservice/openapi/*.yaml" > "${SRC_GEN}/MANIFEST.in"71 # echo "graft gnuboat_mapservice/templates" >> "${SRC_GEN}/MANIFEST.in"72 # echo "global-exclude *.pyc" >> "${SRC_GEN}/MANIFEST.in"73 74 ########75 #76 # Run tox tests and start mapservice77 #78 ########79 # cd src-gen/80 # tox81 # echo "###########################"82 # echo "#"83 # echo "# Do not forget to start the celery worker with"84 # echo "# 1. start RabbitMQ broker with"85 # echo "# sudo service rabbitmq-server start"86 # echo "# 2. start result backend"87 # echo "# sudo service memcached start"88 # echo "# 3. start celery worker with"89 # echo "# cd ${SRC_GEN} && ${CELERY_WORKER_SCRIPT}"90 # echo "#"91 # echo "###########################"92 # export FLASK_ENV="development"93 # python3 -m ${PACKAGE_NAME}
Note:
See TracChangeset
for help on using the changeset viewer.
