We have below task in Makefile
:
test:
export SOME_ENV=someTest
go test -tags=integration -v -race ./tests/integrationtest/...
on shell prompt, SOME_ENV is set and the next command(go test
) internally picks .someTest.env
file
$ export SOME_ENV=someTest
$ go test -tags=integration -v -race ./tests/integrationtest/...
but the Makefile approach doesn't work
Why environment variable is not set using Makefile
approach?
Note: we have another tasks in Makefile that should not be influence with this export