mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 15:44:05 -08:00
Merge pull request #806 from metcalfc/fix_609
Handle building without git.
This commit is contained in:
commit
95bd64c770
|
@ -15,7 +15,9 @@
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
||||||
VERSION?=$(shell cat `git rev-parse --show-toplevel`/VERSION)
|
current_dir := $(patsubst %/,%, $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
|
||||||
|
|
||||||
|
VERSION=$(shell cat $(current_dir)/VERSION)
|
||||||
|
|
||||||
OS=$(shell uname)
|
OS=$(shell uname)
|
||||||
ARCH=$(shell uname -m)
|
ARCH=$(shell uname -m)
|
||||||
|
@ -62,8 +64,8 @@ export GO_TEST_FLAGS ?= -short
|
||||||
|
|
||||||
GO_GET := $(GO) get -u -v -x
|
GO_GET := $(GO) get -u -v -x
|
||||||
|
|
||||||
REV := $(shell git rev-parse --short HEAD)
|
REV := $(shell git rev-parse --short HEAD 2> /dev/null || echo 'unknown')
|
||||||
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2> /dev/null || echo 'unknown')
|
||||||
HOSTNAME := $(shell hostname -f)
|
HOSTNAME := $(shell hostname -f)
|
||||||
BUILD_DATE := $(shell date +%Y%m%d-%H:%M:%S)
|
BUILD_DATE := $(shell date +%Y%m%d-%H:%M:%S)
|
||||||
BUILDFLAGS := -ldflags \
|
BUILDFLAGS := -ldflags \
|
||||||
|
|
Loading…
Reference in a new issue