Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
662637b to
b7f61b6
Compare
| watch_file .git/HEAD | ||
| CURRENT_BRANCH=$(git branch --show-current 2>/dev/null) | ||
| if [ -n "$CURRENT_BRANCH" ] && [ "$CURRENT_BRANCH" != "main" ]; then | ||
| # Convert to lowercase and replace dashes with underscores | ||
| export BUILD_ENGINE_SCHEMA=$(echo "$CURRENT_BRANCH" | tr '[:upper:]' '[:lower:]' | tr '-' '_') | ||
| else # On main branch | ||
| unset BUILD_ENGINE_SCHEMA | ||
| fi |
There was a problem hiding this comment.
Incredible
Shouldn't the unset be setting it to 'main' instead?
There was a problem hiding this comment.
you know... I was thinking we'd just never want to build locally against main accidentally. And I suppose you could also just set the BUILD_ENGINE_SCHEMA=main if you wanted to intentionally. But maybe this is a little over-protective
fvankrieken
left a comment
There was a problem hiding this comment.
The only way I could love this PR more is if I was staying here longer.
Should we add this for other products? Then just do away with a bunch of the env vars in github actions? I think we could also do away with "bash/build_env_setup.sh"
(Oh though then we'd also need direnv in the build images - a little more work)
@fvankrieken Yeah, will add for other products next week (feel free to do this without me on Friday though!) |
Never futz with your
BUILD_ENGINEorBUILD_ENGINE_SERVERever again!Changes
Add
.envrcFilesAdds
.envrcfiles toplutoandfacilities. These will set up your environment for you, namely:.envs themselves)products/pluto/it will set yourBUILD_ENGINE_DBto db-pluto, and calculate the build engine, etc.Add
/bash/binThese are mostly just wrappers around existing bash utils. But this is the preferred way to do it for exporting functions. I think this is a pretty sweet setup... in your terminal you can just type
dcp_and tab-complete to have these fns immediately available. No more sourcing the utils files.Setup Instructions
Install direnv and make sure to note the requirement to add the direnv hook to your shell.
Then once you cd into a directory with a
.envrcyou'll need to rundirenv allowonce to enable direnv.