This commit is contained in:
zezha-msft 2018-09-20 01:17:23 -07:00
Родитель 76a8b41501
Коммит 615ed4c44b
4 изменённых файлов: 11 добавлений и 16 удалений

Просмотреть файл

@ -1,12 +1,9 @@
FROM golang:1.10
FROM golang:1.11
ENV GOPATH /go
ENV PATH ${GOPATH}/bin:$PATH
ENV ACCOUNT_NAME ${ACCOUNT_NAME}
ENV ACCOUNT_KEY ${ACCOUNT_KEY}
RUN go get -u github.com/golang/dep/cmd/dep
RUN go get -u golang.org/x/lint/golint
RUN go get -u github.com/mitchellh/gox
RUN go get -u github.com/golang/lint/golint
ENV GO111MODULE on

Просмотреть файл

@ -1,6 +1,5 @@
PROJECT_NAME = azure-storage-blob-go
WORK_DIR = /go/src/github.com/Azure/${PROJECT_NAME}
GOX_ARCH = linux/amd64 windows/amd64 darwin/amd64
define with_docker
WORK_DIR=$(WORK_DIR) docker-compose run --rm $(PROJECT_NAME) $(1)
@ -18,18 +17,17 @@ docker-build: docker-compose
docker-clean: docker-compose
WORK_DIR=$(WORK_DIR) docker-compose down
dep: docker-build #
$(call with_docker,dep ensure -v)
setup: clean docker-build dep ## setup environment for development
setup: clean docker-build
test: setup ## run go tests
$(call with_docker,go test -race -short -cover -v ./azblob)
build: setup ## build binaries for the project
$(call with_docker,gox -osarch="$(GOX_ARCH)" ./azblob)
GOOS=linux $(call with_docker,go build ./azblob,-e GOOS)
GOOS=darwin $(call with_docker,go build ./azblob,-e GOOS)
GOOS=windows $(call with_docker,go build ./azblob,-e GOOS)
all: setup test build
all: setup build
clean: docker-clean ## clean environment and binaries
rm -rf bin

2
go.mod
Просмотреть файл

@ -1,6 +1,6 @@
module github.com/Azure/azure-storage-blob-go
require (
github.com/Azure/azure-pipeline-go v0.0.0-20180607212504-7571e8eb0876
github.com/Azure/azure-pipeline-go v0.1.8
gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405
)

4
go.sum
Просмотреть файл

@ -1,4 +1,4 @@
github.com/Azure/azure-pipeline-go v0.0.0-20180607212504-7571e8eb0876 h1:3c3mGlhASTJh6H6Ba9EHv2FDSmEUyJuJHR6UD7b+YuE=
github.com/Azure/azure-pipeline-go v0.0.0-20180607212504-7571e8eb0876/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg=
github.com/Azure/azure-pipeline-go v0.1.8 h1:KmVRa8oFMaargVesEuuEoiLCQ4zCCwQ8QX/xg++KS20=
github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg=
gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405 h1:829vOVxxusYHC+IqBtkX5mbKtsY9fheQiQn0MZRVLfQ=
gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=