Changeset 2052b72 for buildhelpers


Ignore:
Timestamp:
Apr 19, 2020, 6:23:15 PM (7 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, master
Children:
24a7f16
Parents:
b240fb0
Message:

Cleaned up code_generator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • buildhelpers/code_generator

    rb240fb0 r2052b72  
    88PACKAGE_VERSION="0.5.90"
    99TARGET_TMP="${SRC_GEN}/${PACKAGE_NAME}_tmp/"
    10 #CELERY_WORKER_SCRIPT="${SRC_GEN}/celery_worker"
    1110
    1211echo "Cleaning directory"
    … …  
    2019echo "Preparing symlinks"
    2120mkdir -p "${TARGET_TMP}"
    22 #cd "${TARGET}"
    23 #mkdir -p server_impl
    24 #cp -a ../../server_impl/* server_impl/
    2521
    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
     22echo "Generating backend API code"
    3323${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}"
    3424mv "${TARGET_TMP}/gnuboat/${PACKAGE_NAME}" "${SRC_GEN}/${PACKAGE_NAME}"
    … …  
    3828echo "Formatting the generated code accoring to style file"
    3929yapf --style "python-style.yapf" -r -i "${SRC_GEN}/${PACKAGE_NAME}"
    40 
    41 # client
    42 #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 class
    46 #cp -a tests/* src-gen/${PACKAGE_NAME}/test/
    47 
    48 ########
    49 #
    50 # Adding additional files to src-gen directory
    51 #
    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 dependencies
    59 # 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 configuration
    64 # 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 templates
    70 # 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 mapservice
    77 #
    78 ########
    79 # cd src-gen/
    80 # tox
    81 # 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.