Skip to content

Commit

Permalink
Nuke some superfluous files. (istio#17303)
Browse files Browse the repository at this point in the history
- Leverage the common version of gobuild.sh, so we can delete
the repo-specific version.

- Cleanup other stray files.
  • Loading branch information
geeknoid authored Sep 22, 2019
1 parent 596e743 commit 9d68028
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 427 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ DOCKER_SOCKET_MOUNT ?= -v /var/run/docker.sock:/var/run/docker.sock
IMG ?= gcr.io/istio-testing/build-tools:2019-09-20T15-04-58
UID = $(shell id -u)
PWD = $(shell pwd)
GOBIN_SOURCE ?= $(GOPATH)/bin
GOBIN ?= /work/out/bin

LOCAL_ARCH := $(shell uname -m)
ifeq ($(LOCAL_ARCH),x86_64)
Expand Down Expand Up @@ -72,7 +70,6 @@ GOOS ?= $(GOOS_LOCAL)
RUN = $(CONTAINER_CLI) run -t -i --sig-proxy=true -u $(UID) --rm \
-e GOOS="$(GOOS)" \
-e GOARCH="$(GOARCH)" \
-e GOBIN="$(GOBIN)" \
-e BUILD_WITH_CONTAINER="$(BUILD_WITH_CONTAINER)" \
-e TZ="$(TIMEZONE)" \
-v /etc/passwd:/etc/passwd:ro \
Expand All @@ -81,7 +78,6 @@ RUN = $(CONTAINER_CLI) run -t -i --sig-proxy=true -u $(UID) --rm \
--mount type=bind,source="$(PWD)",destination="/work" \
--mount type=volume,source=istio-go-mod,destination="/go/pkg/mod" \
--mount type=volume,source=istio-go-cache,destination="/gocache" \
--mount type=bind,source="$(GOBIN_SOURCE)",destination="/go/out/bin" \
-w /work $(IMG)
else
RUN =
Expand Down
17 changes: 7 additions & 10 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ GO_TOP := $(shell echo ${GOPATH} | cut -d ':' -f1)
export GO_TOP

# Note that disabling cgo here adversely affects go get. Instead we'll rely on this
# to be handled in bin/gobuild.sh
# to be handled in common/scripts/gobuild.sh
# export CGO_ENABLED=0

# It's more concise to use GO?=$(shell which go)
Expand Down Expand Up @@ -310,7 +310,7 @@ $(OUTPUT_DIRS):

.PHONY: ${GEN_CERT}
${GEN_CERT}:
GOOS=$(GOOS_LOCAL) && GOARCH=$(GOARCH_LOCAL) && CGO_ENABLED=1 bin/gobuild.sh $@ ./security/tools/generate_cert
GOOS=$(GOOS_LOCAL) && GOARCH=$(GOARCH_LOCAL) && CGO_ENABLED=1 common/scripts/gobuild.sh $@ ./security/tools/generate_cert

#-----------------------------------------------------------------------------
# Target: precommit
Expand Down Expand Up @@ -357,11 +357,11 @@ RELEASE_BINARIES:=pilot-discovery pilot-agent sidecar-injector mixc mixs mixgen

.PHONY: build
build: depend
STATIC=0 GOOS=$(GOOS) GOARCH=$(GOARCH) LDFLAGS='-extldflags -static -s -w' bin/gobuild.sh $(ISTIO_OUT)/ $(BINARIES)
STATIC=0 GOOS=$(GOOS) GOARCH=$(GOARCH) LDFLAGS='-extldflags -static -s -w' common/scripts/gobuild.sh $(ISTIO_OUT)/ $(BINARIES)

.PHONY: build-linux
build-linux: depend
STATIC=0 GOOS=linux GOARCH=amd64 LDFLAGS='-extldflags -static -s -w' bin/gobuild.sh $(ISTIO_OUT_LINUX)/ $(BINARIES)
STATIC=0 GOOS=linux GOARCH=amd64 LDFLAGS='-extldflags -static -s -w' common/scripts/gobuild.sh $(ISTIO_OUT_LINUX)/ $(BINARIES)

# Create targets for ISTIO_OUT_LINUX/binary
$(foreach bin,$(BINARIES),$(ISTIO_OUT_LINUX)/$(shell basename $(bin))): build-linux
Expand All @@ -375,9 +375,6 @@ $(foreach bin,$(BINARIES),$(shell basename $(bin))): build
lint: buildcache
SKIP_INIT=1 bin/linters.sh

shellcheck:
bin/check_shell_scripts.sh

MARKDOWN_LINT_WHITELIST=localhost:8080,storage.googleapis.com/istio-artifacts/pilot/,http://ratings.default.svc.cluster.local:9080/ratings

lint_modern: lint-python lint-copyright-banner lint-scripts lint-dockerfiles lint-markdown lint-yaml
Expand Down Expand Up @@ -411,11 +408,11 @@ DEBUG_LDFLAGS='-extldflags "-static"'

# Non-static istioctl targets. These are typically a build artifact.
${ISTIO_OUT}/istioctl-linux: depend
STATIC=0 GOOS=linux LDFLAGS=$(RELEASE_LDFLAGS) bin/gobuild.sh $@ ./istioctl/cmd/istioctl
STATIC=0 GOOS=linux LDFLAGS=$(RELEASE_LDFLAGS) common/scripts/gobuild.sh $@ ./istioctl/cmd/istioctl
${ISTIO_OUT}/istioctl-osx: depend
STATIC=0 GOOS=darwin LDFLAGS=$(RELEASE_LDFLAGS) bin/gobuild.sh $@ ./istioctl/cmd/istioctl
STATIC=0 GOOS=darwin LDFLAGS=$(RELEASE_LDFLAGS) common/scripts/gobuild.sh $@ ./istioctl/cmd/istioctl
${ISTIO_OUT}/istioctl-win.exe: depend
STATIC=0 GOOS=windows LDFLAGS=$(RELEASE_LDFLAGS) bin/gobuild.sh $@ ./istioctl/cmd/istioctl
STATIC=0 GOOS=windows LDFLAGS=$(RELEASE_LDFLAGS) common/scripts/gobuild.sh $@ ./istioctl/cmd/istioctl

# generate the istioctl completion files
${ISTIO_OUT}/istioctl.bash: istioctl
Expand Down
49 changes: 0 additions & 49 deletions bin/check_shell_scripts.sh

This file was deleted.

44 changes: 0 additions & 44 deletions bin/get_workspace_status.sh

This file was deleted.

78 changes: 0 additions & 78 deletions bin/ghdata.py

This file was deleted.

72 changes: 0 additions & 72 deletions bin/gobuild.sh

This file was deleted.

2 changes: 1 addition & 1 deletion common-protos/.commonfiles.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26f9010dc0dd119451e2e32fb7f704121af55104
8f666ddd60790734388e89a29932014a632ebada

This file was deleted.

Loading

0 comments on commit 9d68028

Please sign in to comment.