Move dev targets to makefiles/ to survive terraform bot#19
Conversation
The tinyfish-github-terraform bot periodically overwrites the root Makefile with a template. The root Makefile already includes makefiles/*, so putting dev targets there keeps them safe. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds a Makefile that automates local development environment setup. The Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@makefiles/Makefile`:
- Around line 25-27: The Makefile recipe that runs "cd frontend && npx convex
deploy --url http://127.0.0.1:3210 --admin-key "$$(grep
CONVEX_SELF_HOSTED_ADMIN_KEY .env.local | cut -d= -f2-)"" is currently echoed by
make, leaking the admin key; edit the Makefile and prefix that recipe line with
a single '@' (i.e., change the start of the command to '`@cd` frontend && npx
convex deploy ...') so make suppresses printing the command (ensure the '@' is
the very first character of the recipe line and that the line remains a
tab-indented Makefile recipe).
- Around line 19-22: The convex-env Makefile recipe should validate
frontend/.env.local and that CLERK_JWT_ISSUER_DOMAIN and
CONVEX_SELF_HOSTED_ADMIN_KEY are present before calling npx convex env set;
update the convex-env target to (1) check the file exists (frontend/.env.local),
(2) extract the two values into shell variables (using grep or cut) and verify
each is non-empty, and (3) print a clear error and exit non-zero if any check
fails, otherwise call npx convex env set with the extracted values; reference
the convex-env target, the frontend/.env.local path, the CLERK_JWT_ISSUER_DOMAIN
and CONVEX_SELF_HOSTED_ADMIN_KEY keys, and the npx convex env set invocation
when making the changes.
- Around line 24-27: The convex-push Makefile target currently shells out to
grep and may pass an empty admin key to npx convex deploy; update the
convex-push recipe to first check that frontend/.env.local exists and then
extract CONVEX_SELF_HOSTED_ADMIN_KEY into a variable (e.g., ADMIN_KEY) and
verify it is non-empty before running npx convex deploy; if the file is missing
or the key is absent/empty, print a clear error mentioning frontend/.env.local
and CONVEX_SELF_HOSTED_ADMIN_KEY and exit non-zero instead of invoking npx
convex deploy with an empty value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
… echo - Add @ prefix to convex-push to prevent leaking admin key in terminal - Validate frontend/.env.local exists and required keys are present before running convex-env and convex-push Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
dev,down,clean,convex-push, andconvex-envtargets from the rootMakefileintomakefiles/Makefileinclude $(wildcard makefiles/*), somake devcontinues to work as beforetinyfish-github-terraform[bot]from wiping these targets on every run (has happened 4 times: c4eec12, 29e6357, 63f6b0f, 4f3cb52)Test plan
make devstarts all services as beforemake downandmake cleanstill work🤖 Generated with Claude Code