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

Commit

Permalink
using GOPROXY environment variable if set instead of the default value
Browse files Browse the repository at this point in the history
Signed-off-by: SataQiu <[email protected]>
  • Loading branch information
SataQiu committed Oct 22, 2019
1 parent 0f78781 commit a5f213d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@

# You can assign 1 to USE_DOCKER so that you can build components of Dragonfly
# with docker.
USE_DOCKER?=0 # Default: build components in the local environment.
USE_DOCKER ?= 0 # Default: build components in the local environment.

# Assign the Dragonfly version to DF_VERSION as the image tag.
DF_VERSION?=latest # Default: use latest as the image tag which built by docker.
DF_VERSION ?= latest # Default: use latest as the image tag which built by docker.

# Default: in order to use go mod we have to export GO111MODULE=on.
export GO111MODULE=on

# Default: use GOPROXY to speed up downloading go mod dependency.
export GOPROXY=https://goproxy.io
export GO111MODULE := on

# Use GOPROXY environment variable if set
GOPROXY := $(shell go env GOPROXY)
ifeq ($(GOPROXY),)
GOPROXY := https://goproxy.io
endif
export GOPROXY

help: ## Display this help information
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m make %-22s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
Expand Down
3 changes: 0 additions & 3 deletions hack/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ GOOS=$(go env GOOS)
GOARCH=$(go env GOARCH)
export GOOS
export GOARCH

export GO111MODULE=on
export GOPROXY=https://goproxy.io

0 comments on commit a5f213d

Please sign in to comment.