Comment 1 for bug 1505853

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: mojo can't be used without exporting at least 3 env vars

AFAICT, the best way forward is simply for us to continue to use a Makefile for development, but move all the env vars out into a (stage specific) envrc in the spec that can alternately be sourced. In development, our Makefile will just ensure it's sourced before running equivalent mojo commands, while on staging / production (or in development if we choose to test), we can manually source the env file and run with mojo directly (the same commands).

FWIW, I've been investigating a way for us devs to be able to use mojo directly (without a Makefile) - with mojo automatically sourcing the relevant env file, but afaict, it's pretty useless, as for mojo to be able to *find* the correct env file in the first place, it still needs MOJO_STAGE=ols/mojo-your-spec-name/stage, and MOJO_WORKSPACE and MOJO_SPEC.. Even if we hack around to derive MOJO_STAGE from the CWD iff MOJO_STAGE isn't defined, we'd still need to either define workspace and spec, or load an env from the spec in the CWD (both of which aren't great options).