make env-prepare

Ensure the workspace .env exists and is correct.


Usage

make env-prepare

What it does

env-prepare is exactly fix-workdir followed by fix-app.

  1. fix-workdir. If ../.env does not exist, it is created from the committed splent_cli/.env.example template; then SPLENT_HOST_PROJECT_DIR is set to the real host path and WORKING_DIR to /workspace.
  2. fix-app. If SPLENT_APP points to a product folder that no longer exists, it is cleared (back to detached mode).

The result is a correct .env, every time, with no chicken-and-egg problem. The template is committed to the repo, so creating the file never depends on the container or on the .env itself.

When to use

You normally never call it directly. make setup and make docker-up run it for you. Call it on its own to bootstrap a .env on a fresh clone without starting Docker.

env-prepare does not fill in your GITHUB_TOKEN / TWINE_PASSWORD. Those are secrets. Open ../.env and add them by hand (or with splent env:set from inside the container).


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es