-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove `Makefile.common` and with it all of the vestigial uses of Prometheus tools * Port linter checks to Makefile using standard go tools Signed-off-by: Nicolas Bock <[email protected]>
- Loading branch information
1 parent
4254edb
commit 22a1486
Showing
2 changed files
with
48 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,53 @@ | ||
# Copyright 2015 The Prometheus Authors | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License 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. | ||
|
||
DOCKER_REPO ?= athena | ||
DOCKER_IMAGE_NAMES ?= processor monitor | ||
|
||
include Makefile.common | ||
.PHONY: all | ||
all: lint build test | ||
|
||
.PHONY: docker-compose | ||
docker-compose: | ||
docker-compose down --remove-orphans | ||
BRANCH=$(shell git branch --show-current) docker-compose up --force-recreate --build | ||
|
||
devel: common-build common-docker docker-compose | ||
.PHONY: devel | ||
devel: athena-monitor athena-processor docker-build docker-compose | ||
|
||
.PHONY: common-docker monitor processor | ||
docker-build: athena-monitor docker-build-monitor athena-processor docker-build-processor | ||
|
||
.PHONY: docker-build-monitor docker-build-processor | ||
docker-build-monitor docker-build-processor: docker-build-%: | ||
docker build \ | ||
--tag athena/athena-$*-linux-amd64:$(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) \ | ||
--file cmd/$*/Dockerfile \ | ||
--no-cache \ | ||
--build-arg ARCH=amd64 \ | ||
--build-arg OS=linux \ | ||
. | ||
|
||
.PHONY: build | ||
build: athena-monitor athena-processor | ||
|
||
athena-monitor: | ||
go build -v -o $@ cmd/monitor/main.go | ||
|
||
athena-processor: | ||
go build -v -o $@ cmd/processor/main.go | ||
|
||
.PHONY: lint | ||
lint: check_modules gofmt | ||
|
||
.PHONY: check_modules | ||
check_modules: | ||
go mod tidy | ||
|
||
.PHONY: gofmt | ||
gofmt: check_modules | ||
@fmt_result=$$(gofmt -d $$(find . -name '*.go' -print)); \ | ||
if [ -n "$${fmt_result}" ]; then \ | ||
echo "gofmt checking failed"; \ | ||
echo; \ | ||
echo "$${fmt_result}"; \ | ||
false; \ | ||
fi | ||
|
||
.PHONY: test | ||
test: | ||
go test -v ./... |
This file was deleted.
Oops, something went wrong.