From 96ac664b27fb0190adf409ea38554c4c0598cf30 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 25 May 2019 18:24:51 +0300 Subject: [PATCH] Add `make victoria-metrics` Makefile rule for building dev binary --- README.md | 4 ++-- app/victoria-metrics/Makefile | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b81a47768..0e8120239 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,8 @@ to your needs. #### Development build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.12. -2. Run `go build ./app/victoria-metrics` from the root folder of the repository. - It will build `victoria-metrics` binary in the root folder of the repository. +2. Run `make victoria-metrics` from the root folder of the repository. + It will build `victoria-metrics` binary and put int into the `bin` folder. #### Production build diff --git a/app/victoria-metrics/Makefile b/app/victoria-metrics/Makefile index 61c887537..b81ce820a 100644 --- a/app/victoria-metrics/Makefile +++ b/app/victoria-metrics/Makefile @@ -1,5 +1,8 @@ # All these commands must run from repository root. +victoria-metrics: + GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/victoria-metrics ./app/victoria-metrics + victoria-metrics-prod: APP_NAME=victoria-metrics $(MAKE) app-via-docker