Cannot build project from command line on fresh git cloned repository

Hello everyone,

I am looking to build Unity project just after git cloning them. However when they are “fresh” (only not giignored files) the build is very short and has no output. I have to open once the project with Unity Editor to make the build command line working.

Is there any way to regenerate project files from command line?

Thank you.

Is there any way to create a new project with command line?

Or start Unity editor with command line, wait it regenerates all files then shut it down then build the project?

I found the problem. Opening a project with the command line and without the argument projectPath seems to open the last opened project and not the project at the curent directory, so I was building the wrong project. However this has to be verified.

In addition runing Unit test with -runTests could be usefull before the build to generate Library folder.