Skip to content

Commit

Permalink
fix sed command
Browse files Browse the repository at this point in the history
Signed-off-by: clyang82 <[email protected]>
  • Loading branch information
clyang82 committed Apr 1, 2024
1 parent b0033a6 commit 612f94b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
BUNDLE_GEN_FLAGS += --use-image-digests
endif


# Set the Operator SDK version to use. By default, what is installed on the system is used.
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
OPERATOR_SDK_VERSION ?= v1.34.1
Expand All @@ -71,6 +70,12 @@ endif
SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec

# Define sed command
SED_COMMAND=sed -i -e
ifeq ($(shell uname), Darwin)
SED_COMMAND=sed -i '' -e
endif

.PHONY: all
all: build

Expand Down Expand Up @@ -221,7 +226,7 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
$(OPERATOR_SDK) bundle validate ./bundle
# ignore relatedImages
sed -i '' -e '/relatedImage/,+10d' bundle/manifests/multicluster-global-hub-operator.clusterserviceversion.yaml
$(SED_COMMAND) '/relatedImage/,+10d' bundle/manifests/multicluster-global-hub-operator.clusterserviceversion.yaml
# remove bundle.Dockerfile
rm -rf bundle.Dockerfile
git diff -I"createdAt" --exit-code
Expand Down

0 comments on commit 612f94b

Please sign in to comment.