diff --git a/.gitignore b/.gitignore index 6f39f896..40c314a9 100644 --- a/.gitignore +++ b/.gitignore @@ -30,20 +30,20 @@ coverage.html *~ # Project specific -weaver/weaver -weavedns/weavedns -weaveproxy/weaveproxy -sigproxy/sigproxy -weavewait/weavewait +prog/weaver/weaver +prog/weavedns/weavedns +prog/weaveproxy/weaveproxy +prog/sigproxy/sigproxy +prog/weavewait/weavewait tools/bin tools/build releases weave.tar weavedns.tar weaveexec.tar -weaveexec/weave -weaveexec/weaveproxy -weaveexec/weavewait -weaveexec/sigproxy -weaveexec/docker*.tgz +prog/weaveexec/weave +prog/weaveexec/weaveproxy +prog/weaveexec/weavewait +prog/weaveexec/sigproxy +prog/weaveexec/docker*.tgz Vagrantfile.local diff --git a/Makefile b/Makefile index b2df6efd..316e1eb5 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,11 @@ SUDO=sudo DOCKERHUB_USER=weaveworks WEAVE_VERSION=git-$(shell git rev-parse --short=12 HEAD) -WEAVER_EXE=weaver/weaver -WEAVEDNS_EXE=weavedns/weavedns -WEAVEPROXY_EXE=weaveproxy/weaveproxy -SIGPROXY_EXE=sigproxy/sigproxy -WEAVEWAIT_EXE=weavewait/weavewait +WEAVER_EXE=prog/weaver/weaver +WEAVEDNS_EXE=prog/weavedns/weavedns +WEAVEPROXY_EXE=prog/weaveproxy/weaveproxy +SIGPROXY_EXE=prog/sigproxy/sigproxy +WEAVEWAIT_EXE=prog/weavewait/weavewait EXES=$(WEAVER_EXE) $(WEAVEDNS_EXE) $(SIGPROXY_EXE) $(WEAVEPROXY_EXE) $(WEAVEWAIT_EXE) @@ -30,7 +30,7 @@ WEAVEEXEC_EXPORT=weaveexec.tar EXPORTS=$(WEAVER_EXPORT) $(WEAVEDNS_EXPORT) $(WEAVEEXEC_EXPORT) WEAVEEXEC_DOCKER_VERSION=1.3.1 -DOCKER_DISTRIB=weaveexec/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz +DOCKER_DISTRIB=prog/weaveexec/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz DOCKER_DISTRIB_URL=https://get.docker.com/builds/Linux/x86_64/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz all: $(EXPORTS) @@ -52,31 +52,31 @@ $(WEAVER_EXE) $(WEAVEDNS_EXE) $(WEAVEPROXY_EXE) $(WEAVEWAIT_EXE): common/*.go co false; \ } -$(WEAVER_EXE): router/*.go ipam/*.go ipam/*/*.go weaver/main.go -$(WEAVEDNS_EXE): nameserver/*.go weavedns/main.go -$(WEAVEPROXY_EXE): proxy/*.go weaveproxy/main.go -$(WEAVEWAIT_EXE): weavewait/*.go weavewait/main.go +$(WEAVER_EXE): router/*.go ipam/*.go ipam/*/*.go prog/weaver/main.go +$(WEAVEDNS_EXE): nameserver/*.go prog/weavedns/main.go +$(WEAVEPROXY_EXE): proxy/*.go prog/weaveproxy/main.go +$(WEAVEWAIT_EXE): prog/weavewait/*.go # Sigproxy needs separate rule as it fails the netgo check in the main # build stanza due to not importing net package -$(SIGPROXY_EXE): sigproxy/main.go +$(SIGPROXY_EXE): prog/sigproxy/main.go go build -o $@ ./$(@D) -$(WEAVER_EXPORT): weaver/Dockerfile $(WEAVER_EXE) - $(SUDO) docker build -t $(WEAVER_IMAGE) weaver +$(WEAVER_EXPORT): prog/weaver/Dockerfile $(WEAVER_EXE) + $(SUDO) docker build -t $(WEAVER_IMAGE) prog/weaver $(SUDO) docker save $(WEAVER_IMAGE):latest > $@ -$(WEAVEDNS_EXPORT): weavedns/Dockerfile $(WEAVEDNS_EXE) - $(SUDO) docker build -t $(WEAVEDNS_IMAGE) weavedns +$(WEAVEDNS_EXPORT): prog/weavedns/Dockerfile $(WEAVEDNS_EXE) + $(SUDO) docker build -t $(WEAVEDNS_IMAGE) prog/weavedns $(SUDO) docker save $(WEAVEDNS_IMAGE):latest > $@ -$(WEAVEEXEC_EXPORT): weaveexec/Dockerfile $(DOCKER_DISTRIB) weave $(SIGPROXY_EXE) $(WEAVEPROXY_EXE) $(WEAVEWAIT_EXE) - cp weave weaveexec/weave - cp $(SIGPROXY_EXE) weaveexec/sigproxy - cp $(WEAVEPROXY_EXE) weaveexec/weaveproxy - cp $(WEAVEWAIT_EXE) weaveexec/weavewait - cp $(DOCKER_DISTRIB) weaveexec/docker.tgz - $(SUDO) docker build -t $(WEAVEEXEC_IMAGE) weaveexec +$(WEAVEEXEC_EXPORT): prog/weaveexec/Dockerfile $(DOCKER_DISTRIB) weave $(SIGPROXY_EXE) $(WEAVEPROXY_EXE) $(WEAVEWAIT_EXE) + cp weave prog/weaveexec/weave + cp $(SIGPROXY_EXE) prog/weaveexec/sigproxy + cp $(WEAVEPROXY_EXE) prog/weaveexec/weaveproxy + cp $(WEAVEWAIT_EXE) prog/weaveexec/weavewait + cp $(DOCKER_DISTRIB) prog/weaveexec/docker.tgz + $(SUDO) docker build -t $(WEAVEEXEC_IMAGE) prog/weaveexec $(SUDO) docker save $(WEAVEEXEC_IMAGE):latest > $@ $(DOCKER_DISTRIB): diff --git a/bin/release b/bin/release index 664f5041..2e34a3f1 100755 --- a/bin/release +++ b/bin/release @@ -61,7 +61,7 @@ build() { fi ## Run tests with the distributables, including version check - v=$(./weaver/weaver --version | grep -o '[0-9].*') + v=$(./prog/weaver/weaver --version | grep -o '[0-9].*') if ! [ "$v" == "$VERSION" ]; then echo "Version of distributable "$v" does not match release version $VERSION" >&2 exit 1 diff --git a/sigproxy/main.go b/prog/sigproxy/main.go similarity index 100% rename from sigproxy/main.go rename to prog/sigproxy/main.go diff --git a/weavedns/Dockerfile b/prog/weavedns/Dockerfile similarity index 100% rename from weavedns/Dockerfile rename to prog/weavedns/Dockerfile diff --git a/weavedns/main.go b/prog/weavedns/main.go similarity index 100% rename from weavedns/main.go rename to prog/weavedns/main.go diff --git a/weaveexec/Dockerfile b/prog/weaveexec/Dockerfile similarity index 100% rename from weaveexec/Dockerfile rename to prog/weaveexec/Dockerfile diff --git a/weaveproxy/main.go b/prog/weaveproxy/main.go similarity index 100% rename from weaveproxy/main.go rename to prog/weaveproxy/main.go diff --git a/weaver/Dockerfile b/prog/weaver/Dockerfile similarity index 100% rename from weaver/Dockerfile rename to prog/weaver/Dockerfile diff --git a/weaver/main.go b/prog/weaver/main.go similarity index 100% rename from weaver/main.go rename to prog/weaver/main.go diff --git a/weavewait/main.go b/prog/weavewait/main.go similarity index 100% rename from weavewait/main.go rename to prog/weavewait/main.go