fix makefile on macos
This commit is contained in:
parent
80f92f70d0
commit
43c197b930
37
Makefile
37
Makefile
|
@ -82,59 +82,28 @@ unit-race:
|
||||||
|
|
||||||
unit-runtime: unit-runtime-go-1.5 unit-runtime-go-1.6 unit-runtime-go-1.7
|
unit-runtime: unit-runtime-go-1.5 unit-runtime-go-1.6 unit-runtime-go-1.7
|
||||||
|
|
||||||
export define DOCKERFILE_GO_1_7
|
|
||||||
FROM golang:1.7
|
|
||||||
|
|
||||||
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
|
||||||
WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
|
||||||
|
|
||||||
CMD ["make", "build", "unit"]
|
|
||||||
endef
|
|
||||||
|
|
||||||
unit-runtime-go-1.7:
|
unit-runtime-go-1.7:
|
||||||
@echo "run test in go 1.7"
|
@echo "run test in go 1.7"
|
||||||
echo "$${DOCKERFILE_GO_1_7}" > "dockerfile_go_1.7"
|
docker build -f "./build/dockerfile-go-1_7/dockerfile" -t "${PREFIX}:go-1.7" .
|
||||||
docker build -f "./dockerfile_go_1.7" -t "${PREFIX}:go-1.7" .
|
|
||||||
rm -f "./dockerfile_go_1.7"
|
|
||||||
docker run --name "${PREFIX}-go-1.7-unit" -t "${PREFIX}:go-1.7"
|
docker run --name "${PREFIX}-go-1.7-unit" -t "${PREFIX}:go-1.7"
|
||||||
docker rm "${PREFIX}-go-1.7-unit"
|
docker rm "${PREFIX}-go-1.7-unit"
|
||||||
docker rmi "${PREFIX}:go-1.7"
|
docker rmi "${PREFIX}:go-1.7"
|
||||||
@echo "ok"
|
@echo "ok"
|
||||||
|
|
||||||
export define DOCKERFILE_GO_1_6
|
|
||||||
FROM golang:1.6
|
|
||||||
|
|
||||||
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
|
||||||
WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
|
||||||
|
|
||||||
CMD ["make", "build", "unit"]
|
|
||||||
endef
|
|
||||||
|
|
||||||
unit-runtime-go-1.6:
|
unit-runtime-go-1.6:
|
||||||
@echo "run test in go 1.6"
|
@echo "run test in go 1.6"
|
||||||
echo "$${DOCKERFILE_GO_1_6}" > "dockerfile_go_1.6"
|
docker build -f "./build/dockerfile-go-1_6/dockerfile" -t "${PREFIX}:go-1.6" .
|
||||||
docker build -f "./dockerfile_go_1.6" -t "${PREFIX}:go-1.6" .
|
|
||||||
rm -f "./dockerfile_go_1.6"
|
|
||||||
docker run --name "${PREFIX}-go-1.6-unit" -t "${PREFIX}:go-1.6"
|
docker run --name "${PREFIX}-go-1.6-unit" -t "${PREFIX}:go-1.6"
|
||||||
docker rm "${PREFIX}-go-1.6-unit"
|
docker rm "${PREFIX}-go-1.6-unit"
|
||||||
docker rmi "${PREFIX}:go-1.6"
|
docker rmi "${PREFIX}:go-1.6"
|
||||||
@echo "ok"
|
@echo "ok"
|
||||||
|
|
||||||
export define DOCKERFILE_GO_1_5
|
|
||||||
FROM golang:1.5
|
|
||||||
ENV GO15VENDOREXPERIMENT="1"
|
|
||||||
|
|
||||||
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
|
||||||
WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
|
||||||
|
|
||||||
CMD ["make", "build", "unit"]
|
|
||||||
endef
|
|
||||||
|
|
||||||
unit-runtime-go-1.5:
|
unit-runtime-go-1.5:
|
||||||
@echo "run test in go 1.5"
|
@echo "run test in go 1.5"
|
||||||
echo "$${DOCKERFILE_GO_1_5}" > "dockerfile_go_1.5"
|
docker build -f "./build/dockerfile-go-1_5/dockerfile" -t "${PREFIX}:go-1.5" .
|
||||||
docker build -f "./dockerfile_go_1.5" -t "${PREFIX}:go-1.5" .
|
|
||||||
rm -f "./dockerfile_go_1.5"
|
|
||||||
docker run --name "${PREFIX}-go-1.5-unit" -t "${PREFIX}:go-1.5"
|
docker run --name "${PREFIX}-go-1.5-unit" -t "${PREFIX}:go-1.5"
|
||||||
docker rm "${PREFIX}-go-1.5-unit"
|
docker rm "${PREFIX}-go-1.5-unit"
|
||||||
docker rmi "${PREFIX}:go-1.5"
|
docker rmi "${PREFIX}:go-1.5"
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
# | Copyright (C) 2017 Yunify, Inc.
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
# | Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# | you may not use this work except in compliance with the License.
|
||||||
|
# | You may obtain a copy of the License in the LICENSE file, or at:
|
||||||
|
# |
|
||||||
|
# | http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
# |
|
||||||
|
# | Unless required by applicable law or agreed to in writing, software
|
||||||
|
# | distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# | See the License for the specific language governing permissions and
|
||||||
|
# | limitations under the License.
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
FROM golang:1.5
|
||||||
|
ENV GO15VENDOREXPERIMENT="1"
|
||||||
|
|
||||||
|
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
||||||
|
WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
||||||
|
|
||||||
|
CMD ["make", "build", "unit"]
|
|
@ -0,0 +1,22 @@
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
# | Copyright (C) 2017 Yunify, Inc.
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
# | Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# | you may not use this work except in compliance with the License.
|
||||||
|
# | You may obtain a copy of the License in the LICENSE file, or at:
|
||||||
|
# |
|
||||||
|
# | http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
# |
|
||||||
|
# | Unless required by applicable law or agreed to in writing, software
|
||||||
|
# | distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# | See the License for the specific language governing permissions and
|
||||||
|
# | limitations under the License.
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
FROM golang:1.6
|
||||||
|
|
||||||
|
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
||||||
|
WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
||||||
|
|
||||||
|
CMD ["make", "build", "unit"]
|
|
@ -0,0 +1,22 @@
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
# | Copyright (C) 2017 Yunify, Inc.
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
# | Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# | you may not use this work except in compliance with the License.
|
||||||
|
# | You may obtain a copy of the License in the LICENSE file, or at:
|
||||||
|
# |
|
||||||
|
# | http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
# |
|
||||||
|
# | Unless required by applicable law or agreed to in writing, software
|
||||||
|
# | distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# | See the License for the specific language governing permissions and
|
||||||
|
# | limitations under the License.
|
||||||
|
# +-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
FROM golang:1.7
|
||||||
|
|
||||||
|
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
||||||
|
WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
||||||
|
|
||||||
|
CMD ["make", "build", "unit"]
|
Loading…
Reference in New Issue