summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2024-04-10 09:43:39 -0400
committerBen Sima <ben@bsima.me>2024-04-10 09:48:58 -0400
commit74f03809a76847c3c026e832d985354638fd9f40 (patch)
treed6a3dfda23e661087ddddde7f0f28cb43801c78e
parent14ca07741c500a0a25c7207175e269e5cd766acd (diff)
Use direnv to set environment in git test runs
To properly run the tests, I need more than just `$CODEROOT`, unfortunately. For example, I also need to be sure I'm using the `bild` version compiled in that environment, and the `lint` from `_/bin/lint`. So anyway just use the full direnv environment.
-rw-r--r--.envrc10
1 files changed, 5 insertions, 5 deletions
diff --git a/.envrc b/.envrc
index 8bdfa95..4fcbff9 100644
--- a/.envrc
+++ b/.envrc
@@ -38,11 +38,11 @@
# configure git
git config --local core.hooksPath "$CODEROOT/Biz/Ide/hooks"
git config --local branchless.test.strategy worktree
- git config --local branchless.test.alias.default 'git clean -ffdx && CODEROOT=$PWD bild --test **/*'
- git config --local branchless.test.alias.bild 'git clean -ffdx && CODEROOT=$PWD bild **/*'
- git config --local branchless.test.alias.lint 'git clean -ffdx && CODEROOT=$PWD bild Biz/Lint.hs && _/bin/lint **/*'
- git config --local branchless.test.alias.lintfix 'git clean -ffdx && CODEROOT=$PWD bild Biz/Lint.hs && _/bin/lint --fix **/*'
- git config --local branchless.test.alias.ci 'git clean -ffdx && CODEROOT=$PWD Biz/Ci.sh'
+ git config --local branchless.test.alias.default 'git clean -ffdx; eval $(direnv export bash); bild --test **/*'
+ git config --local branchless.test.alias.bild 'git clean -ffdx; eval $(direnv export bash); bild **/*'
+ git config --local branchless.test.alias.lint 'git clean -ffdx; eval $(direnv export bash); bild Biz/Lint.hs; lint **/*'
+ git config --local branchless.test.alias.lintfix 'git clean -ffdx; eval $(direnv export bash); bild Biz/Lint.hs; lint --fix **/*'
+ git config --local branchless.test.alias.ci 'git clean -ffdx; eval $(direnv export bash); Biz/Ci.sh'
#
# load local settings
. ./.envrc.local