mirror of
https://github.com/rancher/os.git
synced 2025-09-17 07:30:42 +00:00
migrate to upstream libcompose in one and a half go
This commit is contained in:
48
vendor/github.com/docker/libnetwork/Makefile
generated
vendored
48
vendor/github.com/docker/libnetwork/Makefile
generated
vendored
@@ -1,14 +1,25 @@
|
||||
.PHONY: all all-local build build-local check check-code check-format run-tests check-local install-deps coveralls circle-ci
|
||||
.PHONY: all all-local build build-local check check-code check-format run-tests check-local integration-tests install-deps coveralls circle-ci start-services clean
|
||||
SHELL=/bin/bash
|
||||
build_image=libnetwork-build
|
||||
build_image=libnetworkbuild
|
||||
dockerargs = --privileged -v $(shell pwd):/go/src/github.com/docker/libnetwork -w /go/src/github.com/docker/libnetwork
|
||||
container_env = -e "INSIDECONTAINER=-incontainer=true"
|
||||
docker = docker run --rm ${dockerargs} ${container_env} ${build_image}
|
||||
docker = docker run --rm -it ${dockerargs} ${container_env} ${build_image}
|
||||
ciargs = -e "COVERALLS_TOKEN=$$COVERALLS_TOKEN" -e "INSIDECONTAINER=-incontainer=true"
|
||||
cidocker = docker run ${ciargs} ${dockerargs} golang:1.4
|
||||
|
||||
all: ${build_image}.created
|
||||
${docker} make all-local
|
||||
all: ${build_image}.created build check integration-tests clean
|
||||
|
||||
integration-tests: ./cmd/dnet/dnet
|
||||
@./test/integration/dnet/run-integration-tests.sh
|
||||
|
||||
./cmd/dnet/dnet:
|
||||
make build
|
||||
|
||||
clean:
|
||||
@if [ -e ./cmd/dnet/dnet ]; then \
|
||||
echo "Removing dnet binary"; \
|
||||
rm -rf ./cmd/dnet/dnet; \
|
||||
fi
|
||||
|
||||
all-local: check-local build-local
|
||||
|
||||
@@ -19,13 +30,16 @@ ${build_image}.created:
|
||||
touch ${build_image}.created
|
||||
|
||||
build: ${build_image}.created
|
||||
${docker} make build-local
|
||||
@echo "Building code... "
|
||||
@${docker} ./wrapmake.sh build-local
|
||||
@echo "Done building code"
|
||||
|
||||
build-local:
|
||||
$(shell which godep) go build -tags libnetwork_discovery ./...
|
||||
@$(shell which godep) go build ./...
|
||||
@$(shell which godep) go build -o ./cmd/dnet/dnet ./cmd/dnet
|
||||
|
||||
check: ${build_image}.created
|
||||
${docker} make check-local
|
||||
@${docker} ./wrapmake.sh check-local
|
||||
|
||||
check-code:
|
||||
@echo "Checking code... "
|
||||
@@ -49,18 +63,18 @@ run-tests:
|
||||
ret=$$? ;\
|
||||
if [ $$ret -ne 0 ]; then exit $$ret; fi ;\
|
||||
popd &> /dev/null; \
|
||||
if [ -f $$dir/profile.tmp ]; then \
|
||||
cat $$dir/profile.tmp | tail -n +2 >> coverage.coverprofile ; \
|
||||
if [ -f $$dir/profile.tmp ]; then \
|
||||
cat $$dir/profile.tmp | tail -n +2 >> coverage.coverprofile ; \
|
||||
rm $$dir/profile.tmp ; \
|
||||
fi ; \
|
||||
fi ; \
|
||||
fi ; \
|
||||
fi ; \
|
||||
done
|
||||
@echo "Done running tests"
|
||||
|
||||
check-local: check-format check-code run-tests
|
||||
check-local: check-format check-code start-services run-tests
|
||||
|
||||
install-deps:
|
||||
apt-get update && apt-get -y install iptables
|
||||
apt-get update && apt-get -y install iptables zookeeperd
|
||||
git clone https://github.com/golang/tools /go/src/golang.org/x/tools
|
||||
go install golang.org/x/tools/cmd/vet
|
||||
go install golang.org/x/tools/cmd/goimports
|
||||
@@ -76,4 +90,8 @@ coveralls:
|
||||
# The following target is a workaround for this
|
||||
|
||||
circle-ci:
|
||||
@${cidocker} make install-deps check-local coveralls
|
||||
@${cidocker} make install-deps build-local check-local coveralls
|
||||
make integration-tests
|
||||
|
||||
start-services:
|
||||
service zookeeper start
|
||||
|
Reference in New Issue
Block a user