Commit bb70889
Export Makefile vars so .env reaches gradle (#335)
## Summary
`sinclude .env` loaded `NPR_API_KEY` and `WRITE_BUCKET` as Make
variables but did not export them to recipe subprocesses, so `./gradlew
releasePlugin` invoked via `make release` failed with "Registry API key
must be configured...". Adding a bare `export` directive exports all
Make variables to children.
## Test plan
- [x] Verified `make release` previously failed at
`releasePluginToRegistry` with NPR_API_KEY missing
- [x] Verified `set -a; . ./.env; ./gradlew releasePlugin` succeeds
(used to actually publish 1.0.1)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR fixes `make release` failing at `releasePluginToRegistry` by
adding a bare `export` directive after `sinclude .env`, which causes GNU
Make to forward all Make variables (including `NPR_API_KEY` loaded from
`.env`) into the environment of recipe subprocesses like `./gradlew
releasePlugin`. The fix correctly solves the stated problem, though
exporting every variable is broader than the minimum needed.
<h3>Confidence Score: 4/5</h3>
Safe to merge — the fix is correct and the only finding is a style-level
concern about export scope.
Single P2 finding (bare `export` is broader than necessary); no logic
errors or security issues present.
No files require special attention.
<h3>Important Files Changed</h3>
| Filename | Overview |
|----------|----------|
| Makefile | Adds bare `export` directive so variables loaded from
`.env` via `sinclude` are forwarded to recipe subprocesses (e.g.
`./gradlew releasePlugin`); fix is correct but exports all Make
variables globally rather than only the needed credentials. |
</details>
<h3>Sequence Diagram</h3>
```mermaid
sequenceDiagram
participant Dev as Developer
participant Make as GNU Make
participant Env as .env file
participant Gradle as ./gradlew
Dev->>Make: make release
Make->>Env: sinclude .env (loads NPR_API_KEY, WRITE_BUCKET)
Note over Make: export (all vars → subprocess env)
Make->>Make: run `tag` prerequisite
Make->>Gradle: releasePlugin (env contains NPR_API_KEY)
Gradle-->>Dev: Plugin published ✓
```
<sub>Reviews (1): Last reviewed commit: ["Export Makefile variables so
.env
propag..."](c988438)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=30407531)</sub>
> Greptile also left **1 inline comment** on this PR.
<!-- /greptile_comment -->
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 28ca7b7 commit bb70889
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
2 | 9 | | |
3 | | - | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
0 commit comments