-
Notifications
You must be signed in to change notification settings - Fork 867
Improve development build experience #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,16 @@ | |
| set -euo pipefail | ||
|
|
||
| ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | ||
|
|
||
| # Source .envrc if it exists to load APP_IDENTITY and other environment variables | ||
| # Note: This executes all commands in .envrc, but direnv requires explicit user approval | ||
| # via 'direnv allow', so this is safe for development use. | ||
| if [[ -f "${ROOT_DIR}/.envrc" ]]; then | ||
| # shellcheck disable=SC1091 | ||
| source "${ROOT_DIR}/.envrc" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we verify whether sourcing
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we confirm that the |
||
| export APP_IDENTITY | ||
|
Comment on lines
+13
to
+14
Comment on lines
+12
to
+14
Comment on lines
+12
to
+14
|
||
| fi | ||
|
|
||
|
Comment on lines
+8
to
+16
Comment on lines
+8
to
+16
|
||
| APP_BUNDLE="${ROOT_DIR}/CodexBar.app" | ||
| APP_PROCESS_PATTERN="CodexBar.app/Contents/MacOS/CodexBar" | ||
| DEBUG_PROCESS_PATTERN="${ROOT_DIR}/.build/debug/CodexBar" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compile_and_run.shruns withset -euo pipefail, so sourcing.envrcexecutes every command in that file and hard-fails on common direnv-only helpers (for examplePATH_add/use), which can break local builds even whenAPP_IDENTITYis the only value needed. This also removes direnv’s explicit trust gate: if someone adds a.envrcin a branch, running this script will execute it immediately.Useful? React with 👍 / 👎.