Makefile command reference
Every target in the repo root Makefile. All targets operate on the stock dbt project (src/stock/dbt) unless named *-redbook*.
Setup & testing
| Command | Does |
|---|
make test-setup | First-time setup: creates the stock venv, installs dbt-core/dbt-snowflake, writes DRIVE_STAGING_DBT_KEY_PATH into the venv activation script, runs dbt deps. |
make test | Runs dbt unit tests (dbt test --select "test_type:unit" --target staging). Daily-use command. |
make test-file FILE=<name> | Runs unit tests for one file, e.g. make test-file FILE=test_stock_warranty_ref.yml. Fails with a usage message if FILE is omitted. |
make test-fixtures | Runs fixture-based stored-procedure tests (tests/fixtures/run-fixture-tests.sh). |
make test-all | test + test-fixtures. |
make clean | Deletes the stock project's venv, target, dbt_packages, logs. |
dbt runs — staging
| Command | Does |
|---|
make dbt-run-stock | dbt run --target staging for stock. |
make dbt-run-redbook | Same, for redbook. |
make dbt-full-refresh-stock | dbt build --target staging --full-refresh for stock. Resets deactivated_at/is_sold — the Makefile's own comment flags this as destructive. |
make dbt-full-refresh-redbook | Full refresh for redbook. |
dbt runs — production
| Command | Does |
|---|
make dbt-run-stock-prod | dbt run --target prod for stock. |
make dbt-run-redbook-prod | Same, for redbook. |
make dbt-full-refresh-stock-prod | Full refresh, prod — same deactivated_at/is_sold reset warning applies. |
make dbt-full-refresh-redbook-prod | Full refresh for redbook, prod. |
Migrations
| Command | Does |
|---|
make deploy-migrations-stock | Deploys stock migrations to staging via deploy-migrations.sh. |
make deploy-migrations-redbook | Same, for redbook — currently fails; see note below. |
make deploy-migrations-stock-prod | Deploys stock migrations to production. |
make deploy-migrations-redbook-prod | Deploys redbook migrations to production — currently fails; see note below. |
All four are interactive (dry-run, then a y/N prompt) — see Deploying migrations locally for the non-interactive form.
The redbook targets cd into src/redbook/dbt, but redbook's deploy-migrations.sh requires running from inside migrations/ itself — see Deploying migrations locally for the working invocation.
See also