From 3a5c0f30c171b7cbb3e6a3c4074fe9cc1fb5f566 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Tue, 28 Jul 2015 08:52:41 -0700 Subject: [PATCH] create a unix-style tarball with a nested folder --- Makefile | 5 ++++- Makefile.INCLUDE | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7e0ec754e..e07113414 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,10 @@ docker: tarball: $(ARCHIVE) $(ARCHIVE): build - tar -czf $(ARCHIVE) prometheus promtool consoles console_libraries + mkdir -p $(ARCHIVEDIR) + cp -a prometheus promtool consoles console_libraries $(ARCHIVEDIR) + tar -czf $(ARCHIVE) $(ARCHIVEDIR) + rm -rf $(ARCHIVEDIR) release: REMOTE ?= $(error "can't upload, REMOTE not set") release: REMOTE_DIR ?= $(error "can't upload, REMOTE_DIR not set") diff --git a/Makefile.INCLUDE b/Makefile.INCLUDE index e289fac59..b54708b91 100644 --- a/Makefile.INCLUDE +++ b/Makefile.INCLUDE @@ -76,4 +76,5 @@ BUILDFLAGS := -ldflags \ -X $(REPO_PATH)/version.GoVersion $(GO_VERSION)" CURL := curl -ARCHIVE := prometheus-$(VERSION).$(GOOS)-$(GOARCH).tar.gz +ARCHIVEDIR := prometheus-$(VERSION).$(GOOS)-$(GOARCH) +ARCHIVE := $(ARCHIVEDIR).tar.gz