Makefile: Add section for environment variables
GIT_VERSION can be set to, for instance, run tests with a specific git version. Add a section to make help
to display this.
make help
output:
usage: make [<target>...] [<variable>=<value>...]
These are the available targets:
all Default target which builds Gitaly.
bench Run Go benchmarks.
build-bundled-git Build bundled Git binaries.
build Build Go binaries and install required Ruby Gems.
clean Clean up build artifacts.
cover Generate coverage report via Go tests.
debug-test-go Run Go tests in delve debugger.
dump-database-schema Dump the clean database schema of Praefect into a file.
format Run Go formatter and adjust imports.
git Build Git.
help Print help about available targets and variables.
install-bundled-git Install bundled Git binaries. The target directory can be modified by setting PREFIX and DESTDIR.
install Install Gitaly binaries. The target directory can be modified by setting PREFIX and DESTDIR.
libgit2 Build libgit2.
lint Run Go linter.
notice Regenerate the NOTICE file.
proto Regenerate protobuf definitions.
race-go Run Go tests with race detection enabled.
rspec Run Ruby tests.
rubocop Run Rubocop.
test-go Run Go tests.
test-with-praefect Run Go tests with Praefect.
test Run Go and Ruby tests.
verify Verify that various files conform to our expectations.
These are common variables which can be overridden in config.mak:
DEBUG_OPTIONS Test options passed to `dlv test`.
FIPS_MODE FIPS_MODE controls whether to build Gitaly and dependencies in FIPS mode. Set this to a non-empty value to enable it.
GIT_BUILD_OPTIONS Build options for Git.
GIT_PREFIX The prefix where Git will be installed to.
LIBGIT2_BUILD_OPTIONS Build options for libgit2.
PREFIX The prefix where Gitaly binaries will be installed to. Binaries will end up in ${PREFIX}/bin by default.
PROTOC_BUILD_OPTIONS Build options for protoc.
TEST_COVERAGE_DIR Specify the output directory for test coverage reports.
TEST_FORMAT Specify the output format used to print tests ["standard-verbose", "standard-quiet", "short"]
TEST_OPTIONS Test options passed to `go test`.
TEST_PACKAGES List of Go packages which shall be tested. Go packages to test when using the test-go target.
TEST_TMP_DIR Directory where all runtime test data is being created.
These are environment variables which can be used:
GIT_VERSION Sets the git version.
Edited by John Cai