Skip to content

Commit

Permalink
Merge pull request #243 from dholbach/remove-tools
Browse files Browse the repository at this point in the history
Remove tools
  • Loading branch information
matthewmrichter authored May 11, 2020
2 parents 52e5826 + 6d81f8b commit bf7bb9f
Show file tree
Hide file tree
Showing 97 changed files with 1 addition and 5,657 deletions.
175 changes: 0 additions & 175 deletions COPYING.LGPL-3

This file was deleted.

31 changes: 1 addition & 30 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
.PHONY: all clean clean-deps lint test deps coverage
.DEFAULT_GOAL := all

# Boiler plate for bulding Docker containers.
# All this must go at top of file I'm afraid.
IMAGE_PREFIX := weaveworks
IMAGE_TAG := $(shell ./tools/image-tag)
GIT_REVISION := $(shell git rev-parse HEAD)
UPTODATE := .uptodate

# Building Docker images is now automated. The convention is every directory
# with a Dockerfile in it builds an image calls weaveworks/<dirname>.
# Dependencies (i.e. things that go in the image) still need to be explicitly
# declared.
%/$(UPTODATE): %/Dockerfile
$(SUDO) docker build --build-arg=revision=$(GIT_REVISION) -t $(IMAGE_PREFIX)/$(shell basename $(@D)) $(@D)/
$(SUDO) docker tag $(IMAGE_PREFIX)/$(shell basename $(@D)) $(IMAGE_PREFIX)/$(shell basename $(@D)):$(IMAGE_TAG)
touch $@

# Get a list of directories containing Dockerfiles
DOCKERFILES=$(shell find * -type f -name Dockerfile ! -path "tools/*" ! -path "vendor/*")
UPTODATE_FILES=$(patsubst %/Dockerfile,%/$(UPTODATE),$(DOCKERFILES))
DOCKER_IMAGE_DIRS=$(patsubst %/Dockerfile,%,$(DOCKERFILES))
IMAGE_NAMES=$(foreach dir,$(DOCKER_IMAGE_DIRS),$(patsubst %,$(IMAGE_PREFIX)/%,$(shell basename $(dir))))

# Python-specific stuff
TOX := $(shell command -v tox 2> /dev/null)
PIP := $(shell command -v pip3 2> /dev/null)
FLAKE8 := $(shell command -v flake8 2> /dev/null)

DOCS_PORT:=8000

.ensure-tox: .ensure-pip
ifndef TOX
rm -f .ensure-tox
Expand All @@ -51,10 +27,7 @@ ifndef FLAKE8
endif
touch .ensure-pip

images:
$(info $(IMAGE_NAMES))

all: $(UPTODATE_FILES) test lint coverage
all: test lint coverage

deps: setup.py .ensure-tox tox.ini

Expand All @@ -70,8 +43,6 @@ coverage:
$(TOX) -e coverage

clean:
$(SUDO) docker rmi $(IMAGE_NAMES) >/dev/null 2>&1 || true
rm -rf $(UPTODATE_FILES)
rm -rf grafanalib.egg-info
rm -f .ensure-pip .ensure-tox .ensure-flake8
find . -name '*.pyc' | xargs rm
Expand Down
10 changes: 0 additions & 10 deletions tools/.gitignore

This file was deleted.

52 changes: 0 additions & 52 deletions tools/README.md

This file was deleted.

46 changes: 0 additions & 46 deletions tools/build/Makefile

This file was deleted.

49 changes: 0 additions & 49 deletions tools/build/golang/Dockerfile

This file was deleted.

Loading

0 comments on commit bf7bb9f

Please sign in to comment.