Sharing code between flexible environment modules in a GAE project

前端 未结 3 928
清歌不尽
清歌不尽 2021-01-26 08:41

I\'m structuring my GAE (flex) project as a number of services:

- my-project/
  - services/
    - service_1/
      - service_1.yaml
    - service_2/
      - serv         


        
3条回答
  •  佛祖请我去吃肉
    2021-01-26 09:13

    I came up with another solution that seems to the best of a bunch of bad alternatives... This is what I ruled out:

    • hard links -- not supported by GIT
    • git submodules or subtrees -- too complicated
    • splitting the shared code to an different project and adding to requirements.txt -- also too complicated

    My solution was to create this two line bash script:

    rm -rf deploy_dir
    cp -RLp code_dir deploy_dir
    

    It copies all my code to a new directory, and in doing the copying, all sym links get replaced with the files they linked to. I then deploy from deploy_dir

提交回复
热议问题