Skip to content

Commit

Permalink
Merge pull request kubernetes-retired#950 from wking/travis-drop-clean
Browse files Browse the repository at this point in the history
Makefile: Remove clean prerequisites from build targets
  • Loading branch information
aaronlevy authored Aug 21, 2018
2 parents b66af43 + 15ef313 commit 7fef233
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ before_script:
go:
- 1.10.x
script:
- make clean release
- make release
11 changes: 7 additions & 4 deletions Documentation/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@ cd $(go env GOPATH | cut -d: -f1)/src/github.com/kubernetes-incubator/bootkube
Then build:

```
make clean all
make clean
make all
```

## Local Development Environments

To easily launch local vagrant development clusters:
To easily launch local, single-node vagrant development clusters:

```
# Launch a single-node cluster
make clean-vm-single
make run-single
```

You can also launch a multi-node cluster:

```
# Launch a multi-node cluster
make clean-vm-multi
make run-multi
```

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export PATH:=$(PATH):$(PWD)

LOCAL_OS:=$(shell uname | tr A-Z a-z)
GOFILES:=$(shell find . -name '*.go' ! -path './vendor/*')
VENDOR_GOFILES ?= $(shell find vendor -name '*.go')
LDFLAGS=-X github.com/kubernetes-incubator/bootkube/pkg/version.Version=$(shell $(CURDIR)/build/git-version.sh)
TERRAFORM:=$(shell command -v terraform 2> /dev/null)

Expand All @@ -23,7 +24,6 @@ cross: \
_output/bin/linux/s390x/checkpoint

release: \
clean \
check \
_output/release/bootkube.tar.gz \

Expand All @@ -47,7 +47,7 @@ install:
_output/bin/%: GOOS=$(word 1, $(subst /, ,$*))
_output/bin/%: GOARCH=$(word 2, $(subst /, ,$*))
_output/bin/%: GOARCH:=amd64 # default to amd64 to support release scripts
_output/bin/%: $(GOFILES)
_output/bin/%: $(GOFILES) $(VENDOR_GOFILES)
mkdir -p $(dir $@)
GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $@ github.com/kubernetes-incubator/bootkube/cmd/$(notdir $@)

Expand All @@ -56,7 +56,7 @@ _output/release/bootkube.tar.gz: _output/bin/linux/bootkube _output/bin/darwin/b
tar czf $@ -C _output bin/linux/bootkube bin/darwin/bootkube bin/linux/checkpoint

run-%: GOFLAGS = -i
run-%: clean-vm-% _output/bin/linux/bootkube _output/bin/$(LOCAL_OS)/bootkube
run-%: _output/bin/linux/bootkube _output/bin/$(LOCAL_OS)/bootkube
@cd hack/$*-node && ./bootkube-up
@echo "Bootkube ready"

Expand All @@ -68,7 +68,7 @@ clean-vm-%:
rm -rf cluster )

#TODO(aaron): Prompt because this is destructive
conformance-%: clean all
conformance-%: all
@cd hack/$*-node && vagrant destroy -f
@cd hack/$*-node && rm -rf cluster
@cd hack/$*-node && ./bootkube-up
Expand Down

0 comments on commit 7fef233

Please sign in to comment.