automated django receive hook on server: respond to collectstatic with “yes”

后端 未结 2 1501
情话喂你
情话喂你 2021-02-01 00:12

I\'m using a Github post-recieve hook to run a bash file that pulls both my repos.

#!/bin/sh
cd ~/public_html/repo_static
env -i /usr/bin/git pull origin master
         


        
相关标签:
2条回答
  • 2021-02-01 01:02

    If you'd like to specify the default answer, you could also just pipe it into the command:

    $ echo yes | python manage.py collectstatic
    

    or

    $ echo no | python manage.py collectstatic
    
    0 讨论(0)
  • 2021-02-01 01:05
    python manage.py collectstatic --noinput
    
    0 讨论(0)
提交回复
热议问题