Email or username:

Password:

Forgot your password?
Nikita

My fellow devs, I need your opinion:

Say, you have a software project. To do some operations more quickly, you write helper scripts. Think `build.sh`, `download_dependencies.py`, whatever. You may use them yourself or in CI.

What is your directory name of choice for these scripts?

See next post for clarification.

#BoostsWelcome #FediPoll

Anonymous poll

Poll

./scripts
13
72.2%
./script
1
5.6%
./build
1
5.6%
something else (plz reply)
3
16.7%
18 people voted.
Voting ended 15 April at 9:59.
5 comments
Nikita

`./scripts` is so far the most popular, it’s just what I have seen across projects.

`./script` was proposed (and is still used?) by GitHub. See github.com/github/scripts-to-r

`./build` is sometimes used because these scripts are often executed at build-time (and thus in CI)

Another thing I’ve seen were scripts in the repository root, but for the sake of the poll let’s assume there are too many scripts for this.

Peter Makholm

@kytta Theoretically I would use `./scripts` for development tools and `./bin` for other maintenance tools. Deploy tools might fall in either category depending on the type of project.

In practice I often start out by just having one of those and dump everything there. In that case it might be a bit random if it ends up being named `./bin` or `./scripts`.

Григорий Клюшников

I would put them into the root directory. For additional things that one would run manually, e.g. code generation or validation, I use ./tools.

./build in my mind is where intermediate build artifacts go because that's what Android Studio does.

­

@kytta I prefer putting this kind of stuff in a Makefile 🤷‍♂️
These actions are often interconnected, e.g. package requires build, build requires fetch_deps, etc. Makefile makes it trivial to manage and good for discoverability.

But if not, then I'd go with ./bin probably.

Frank Wiles

@kytta I use “just” instead to build them. Sort of like Makefiles but better.

Go Up