-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace bazel with Makefile and bash (#401)
* Replace bazel with Makefile and bash The gocli project is not complex enough to require bazel Signed-off-by: Quique Llorente <[email protected]> * Update gocli hash Signed-off-by: Quique Llorente <[email protected]> * Use system's go cmd instead of vendoring it Signed-off-by: Quique Llorente <[email protected]> * Update gocli sha Signed-off-by: Quique Llorente <[email protected]>
- Loading branch information
Showing
12 changed files
with
38 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/go* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
all: fmt build | ||
SHELL := /bin/bash | ||
|
||
.PHONY: build | ||
build: fmt | ||
bazel run //:gazelle | ||
bazel build //:cli | ||
BIN_DIR = $(CURDIR)/build | ||
GO ?= go | ||
|
||
export GO111MODULE=on | ||
export GOPROXY=direct | ||
export GOSUMDB=off | ||
export GOFLAGS=-mod=vendor | ||
|
||
|
||
all: container-run | ||
|
||
.PHONY: gocli | ||
cli: fmt | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -o $(BIN_DIR)/cli ./cmd/cli | ||
|
||
.PHONY: fmt | ||
fmt: | ||
go fmt ./cmd/... | ||
go fmt ./docker/... | ||
$(GO) fmt ./cmd/... | ||
$(GO) fmt ./docker/... | ||
|
||
.PHONY: container | ||
container: fmt | ||
bazel build //:gocli | ||
container: cli | ||
docker build -t kubevirtci/gocli build/ | ||
|
||
.PHONY: container-run | ||
container-run: fmt | ||
bazel run //:gocli | ||
container-run: container | ||
docker run kubevirtci/gocli | ||
|
||
.PHONY: deps-update | ||
deps-update: | ||
GO111MODULE=on go mod tidy | ||
GO111MODULE=on go mod vendor | ||
bazel run //:gazelle | ||
.PHONY: vendor | ||
vendor: | ||
$(GO) mod tidy | ||
$(GO) mod vendor | ||
|
||
.PHONY: push | ||
push: fmt | ||
bazel run --host_force_python=PY2 //:push-all | ||
push: container | ||
docker push kubevirtci/gocli |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
go* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM scratch | ||
|
||
COPY cli /cli | ||
|
||
ENTRYPOINT ["/cli"] |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters