In addition to @simon's answer.
Not all in the software engineering is about programming, designing or modelling. There's a myriad of tasks we perform continuously during the working day. You already mentioned one -building the project outside the IDE- but there are many more.
Experienced / proactive developers tend to automate these tasks. Some, even build tools when these tasks become part of the SDLC and they are tedious -and prone to error- to do by hand. Programs are good at doing repetitive jobs, no matter how tedious they are. We -humans- are not that good.
These tools/scripts have others positive side-effects
- Productivity
- Transfer of knowledge
- Autonomy (for newcomers)
So, yes the scripts should be in the SCM and they should be one more tool in the developer's toolbox.
Regarding the folder /scripts
I would say that It doesn't matter. For simplicity I leave them in the project's root directory so that all the routes declared in the scripts are relative to the project's folder. If I need access to external folders or files, I create soft links.
Things to consider before checking the scripts into the SCM.
For security, make sure the scripts have no hardcoded credentials -ideally, the scripts should be well parametrized-
Make sure the scripts don't do odd things to the system, as for instance to execute commands that can not be undone (the most typical rm -rf
).
Since these become part of the project's source, documentation is highly appreciated.
Scripting is not rocket science. Make scripts concise. Instead of one to rule them all ... and in the darkness bind them, make more, smaller and concise. As if you were applying SRP.