From 74f03809a76847c3c026e832d985354638fd9f40 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 10 Apr 2024 09:43:39 -0400 Subject: 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. --- .envrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.envrc') 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 -- cgit v1.2.3