Recommended bash scripts for every project
- clean_start ensures you are ready to start new work. It does:
- 'pull -r' (which fails if you have uncommitted work)
- a refresh of the local environment
- 'git clean -i' in case you have untracked files you've forgotten about
- a full test run.
- onboard is the script to run if you are a brand-new developer and you need to set up your development environment. It will deal with setting up the environment (installing dependencies and any virtual environment) and runs the tests.
- run runs the application itself.
I started adding run scripts when I started changing between ruby, python, java and other projects and got tired of having to remember which incantation started the servers. This is a shortcut. - run_tests will run all of the tests -- every kind.
- run_integration_tests will run only the integration tests (I don't always separate these).
Another useful trick is to add a precommit hook so that you cannot commit locally unless all the tests are running successfully.
It can be helpful to have an LLM/agent/AI write these scripts initially and keep them up to date. You can do just as good a job as they can, but it is a fairly simple task that most of them can handle well enough.
No comments:
Post a Comment