mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-24 10:13:41 -05:00
Simplify the run_integration_tests.sh script
Our minimum required git version is 2.32.0, which is the first version that does support the GIT_CONFIG_GLOBAL env var, so we don't need the ~/.gitconfig dance any more.
This commit is contained in:
@@ -2,16 +2,6 @@
|
||||
|
||||
echo "Running integration tests with $(git --version)"
|
||||
|
||||
# This is ugly, but older versions of git don't support the GIT_CONFIG_GLOBAL
|
||||
# env var; the only way to run tests for these old versions is to copy our test
|
||||
# config file to the actual global location. Move an existing file out of the
|
||||
# way so that we can restore it at the end.
|
||||
if test -f ~/.gitconfig; then
|
||||
mv ~/.gitconfig ~/.gitconfig.lazygit.bak
|
||||
fi
|
||||
|
||||
cp test/global_git_config ~/.gitconfig
|
||||
|
||||
# if the LAZYGIT_GOCOVERDIR env var is set, we'll capture code coverage data
|
||||
if [ -n "$LAZYGIT_GOCOVERDIR" ]; then
|
||||
# Go expects us to either be running the test binary directly or running `go test`, but because
|
||||
@@ -33,10 +23,6 @@ else
|
||||
EXITCODE=$?
|
||||
fi
|
||||
|
||||
if test -f ~/.gitconfig.lazygit.bak; then
|
||||
mv ~/.gitconfig.lazygit.bak ~/.gitconfig
|
||||
fi
|
||||
|
||||
# If per-test timings were collected (LAZYGIT_TEST_TIMING points at the file the
|
||||
# harness appends to), print them sorted by slowest first so they show up in the
|
||||
# CI log.
|
||||
|
||||
Reference in New Issue
Block a user