Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
operator.make: build operator-sdk binary from source
Browse files Browse the repository at this point in the history
Released operator-sdk binary does not work for us, that needs below
fixes:
operator-framework/operator-sdk#3787
operator-framework/operator-sdk#3786

So, as interim solution, we build it from patched source.
  • Loading branch information
avalluri committed Sep 16, 2020
1 parent a1fe23c commit 63c2554
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions operator/operator.make
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@ OPERATOR_SDK_VERSION=v1.0.0
# download operator-sdk binary
_work/bin/operator-sdk-$(OPERATOR_SDK_VERSION):
mkdir -p _work/bin/ 2> /dev/null
curl -L https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk-$(OPERATOR_SDK_VERSION)-x86_64-linux-gnu -o $(abspath $@)
# Building operator-sdk from sources as that needs below fixes:
# https://github.com/operator-framework/operator-sdk/pull/3787
# https://github.com/operator-framework/operator-sdk/pull/3786
# curl -L https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk-$(OPERATOR_SDK_VERSION)-x86_64-linux-gnu -o $(abspath $@)
tmpdir=`mktemp -d` && \
trap 'set -x; rm -rf $$tmpdir' EXIT && \
git clone --branch 1.0.0+fixes https://github.com/avalluri/operator-sdk.git $$tmpdir && \
cd $$tmpdir && $(MAKE) build/operator-sdk && \
cp $$tmpdir/build/operator-sdk $(abspath $@) && \
chmod a+x $(abspath $@)
$(shell cd _work/bin/; ln -sf operator-sdk-$(OPERATOR_SDK_VERSION) operator-sdk)
cd $(dir $@); ln -sf operator-sdk-$(OPERATOR_SDK_VERSION) operator-sdk

# Re-generates the K8S source. This target is supposed to run
# upon any changes made to operator api.
Expand Down

0 comments on commit 63c2554

Please sign in to comment.