diff --git a/.travis/install.sh b/.travis/install.sh index c22d33e2f..7c03d45f4 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -5,3 +5,7 @@ go get github.com/securego/gosec/cmd/gosec/... echo "Installing golint" go get -u golang.org/x/lint/golint + +echo "Installing operator-sdk" +curl https://github.com/operator-framework/operator-sdk/releases/download/v0.0.7/operator-sdk-v0.0.7-x86_64-linux-gnu -sLo $GOPATH/bin/operator-sdk +chmod +x $GOPATH/bin/operator-sdk \ No newline at end of file diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index d734b1bae..41c1a7cb7 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -30,6 +30,16 @@ make dep make install ---- +Alternatively, a released binary can be used instead: + +[source,bash] +---- +curl https://github.com/operator-framework/operator-sdk/releases/download/v0.0.7/operator-sdk-v0.0.7-x86_64-linux-gnu -sLo $GOPATH/bin/operator-sdk +chmod +x $GOPATH/bin/operator-sdk +---- + +NOTE: Make sure your `$GOPATH/bin` is part of your regular `$PATH`. + === Developing As usual for operators following the Operator SDK, the dependencies are checked into the source repository under the `vendor` directory. The dependencies are managed using link:https://github.com/golang/dep[`go dep`]. Refer to that project's documentation for instructions on how to add or update dependencies. diff --git a/Makefile b/Makefile index 8d982f415..65f123606 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,10 @@ check: @echo Checking... @$(foreach file, $(shell go fmt $(PACKAGES) 2>&1), echo "Some files need formatting. Failing." || exit 1) +.PHONY: ensure-generate-is-noop +ensure-generate-is-noop: generate + @git diff -s --exit-code pkg/apis/io/v1alpha1/zz_generated.deepcopy.go || (echo "Build failed: a model has been changed but the deep copy functions aren't up to date. Run 'make generate' and update your PR." && exit 1) + .PHONY: format format: @echo Formatting code... @@ -97,4 +101,4 @@ test: unit-tests e2e-tests all: check format lint build test .PHONY: ci -ci: check format lint build unit-tests +ci: ensure-generate-is-noop check format lint build unit-tests