chore: add debug environment variable to Makefile
Description
This MR defines a DEBUG
environment variable in the Makefile
that can be used to build the glab
binary enabling debugMode=$(DEBUG)
.
Related Issues
Resolves
How has this been tested?
make DEBUG=true
go build -trimpath -ldflags "-X main.build=2023-03-08 -X main.version=v1.24.1-86-gb7e92615 -X main.debugMode=true" -o ./bin/glab gitlab.com/gitlab-org/cli/cmd/glab
❯ make
go build -trimpath -ldflags "-X main.build=2023-03-08 -X main.version=v1.24.1-86-gb7e92615 -X main.debugMode=false" -o ./bin/glab gitlab.com/gitlab-org/cli/cmd/glab
Observe that main.debugMode=true
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap