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

Use bash with source #4761

Closed
wants to merge 1 commit into from

Conversation

shaardie
Copy link

Description of the change:

This patch calls the commands with source with the bash directly.

Motivation for the change:

This way these commands also work on OS like Debian where /bin/sh is actually
not the bash, but another maybe not compatitible shell like dash.

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@@ -13,7 +13,7 @@ ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
test: manifests generate fmt vet
mkdir -p ${ENVTEST_ASSETS_DIR}
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/master/hack/setup-envtest.sh
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out
base -c "source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
base -c "source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out"
bash -c "source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@jmrodri
Copy link
Member

jmrodri commented Apr 15, 2021

@varshaprasad96 could you verify this change also works on a Mac?

This patch calls the commands with `source` with the bash directly.
This way these commands also work on OS like Debian where `/bin/sh` is actually
not the bash, but another maybe not compatitible shell like `dash`.

Signed-off-by: Sven Haardiek <sven@haardiek.de>
@estroz
Copy link
Member

estroz commented Apr 19, 2021

This will be fixed by kubernetes-sigs/kubebuilder#2149 upstream then pulled into operator-sdk. If the fix is not accepted upstream, I'd like to port those changes here.

@estroz
Copy link
Member

estroz commented Apr 19, 2021

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 19, 2021
@jmrodri
Copy link
Member

jmrodri commented May 6, 2021

Upstream kubebuilder PR 2149 merged. We've pulled in kubebuilder v3.0.0 in PR #4835 . I'm going to close this PR in favor of the kubebuilder.

@jmrodri jmrodri closed this May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants