Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set bash shell as preferred for make #812

Merged
merged 1 commit into from
Jun 3, 2022
Merged

Set bash shell as preferred for make #812

merged 1 commit into from
Jun 3, 2022

Conversation

mjgrzybek
Copy link
Contributor

@mjgrzybek mjgrzybek commented Jun 2, 2022

Description

After recent Makefile refactoring, SHELL = bash disappeared.
By default sh is used and it lacks of bashisms like source which is used in e.g. go/test target:

$ make go/test
...                                                                               
source /home/michal/workspace/dynatrace-operator//testbin/setup-envtest.sh; fetch_envtest_tools /home/michal/workspace/dynatrace-operator//testbin; setup_env
test_env /home/michal/workspace/dynatrace-operator//testbin; go test ./... -coverprofile cover.out                                                                         
/bin/sh: 1: source: not found                                                                                                                                                            
/bin/sh: 1: fetch_envtest_tools: not found                                                                                                                                               
/bin/sh: 1: setup_envtest_env: not found                                                                                                                                                 
?       github.com/Dynatrace/dynatrace-operator/src/agproxysecret       [no test files]                                                                                                  
ok      github.com/Dynatrace/dynatrace-operator/src/api/v1alpha1        0.113s  coverage: 7.7% of statements                                                                             
ok      github.com/Dynatrace/dynatrace-operator/src/api/v1beta1 0.048s  coverage: 31.4% of statement

Set SHELL = bash fixes the issue.

How can this be tested?

make with any target works properly
e.g.: make go/test

Checklist

  • Unit tests have been updated/added
  • PR is labeled accordingly

@mjgrzybek mjgrzybek added the bug Something isn't working label Jun 2, 2022
@mjgrzybek mjgrzybek requested a review from a team as a code owner June 2, 2022 12:24
@mjgrzybek mjgrzybek enabled auto-merge (squash) June 2, 2022 12:30
@mjgrzybek mjgrzybek merged commit 0fc44d6 into master Jun 3, 2022
@mjgrzybek mjgrzybek deleted the bugfix/make-go branch June 3, 2022 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants