ehmatthes / django-simple-deploy

A reusable Django app that configures your project for deployment
BSD 3-Clause "New" or "Revised" License
307 stars 26 forks source link

fix shellscripts with `shellcheck` #230

Closed darjeeling closed 1 year ago

darjeeling commented 1 year ago

update shell scripts with shellcheck

I think we can adopt on github actions

ehmatthes commented 1 year ago

As you brought up in #223, I think the best move here is to convert the shell scripts to Python functions. Then all testing work is done in Python, and it should be cross-platform as well.

I think that addresses the incompatibility of different shell environments across OSes, and different terminal environments that people on the same OS have as well.

How does that sound?

darjeeling commented 1 year ago

@ehmatthes I agree with that. also want to address we should do running and shooting same time. little by little

ehmatthes commented 1 year ago

I'm not sure what you mean by "running and shooting"?

darjeeling commented 1 year ago

@ehmatthes I can't sure about origins about that expression. but we should do both "running and shooting" in the war. if we do running only, will loose if we do shooting only, we can't move

for this PR. I have two think both time.

  1. we need to convert to python
  2. we need to run test done well.

so if I were you, I'll merge and document this first. if testing is working. because it's done and working and this PR is not changing django-simple-deploy itself.

after that, I'll try to convert shell script to python. step by step.

ehmatthes commented 1 year ago

so if I were you, I'll merge and document this first. if testing is working. because it's done and working and this PR is not changing django-simple-deploy itself.

That's good reasoning, sorry to not pick up on that. I'm getting some test failures based on simple things like line endings not matching. I'm about to board a plane, but I'll look at this a little later when I'm between flights.

I can't sure about origins about that expression...

Thank you, I love these discussions!

after that, I'll try to convert shell script to python. step by step.

Can we move that discussion to #233?

ehmatthes commented 1 year ago

Removing line 10 in call_simple_deploy.sh breaks unit tests on my system. Maybe shellcheck is configured for your system?

I don't think it's worth troubleshooting this. I'm going to start replacing these shell scripts, and then we can troubleshoot any issues in Python.

darjeeling commented 1 year ago

ok. we can go with new python testing utils.