From c575520aa51331b771af8c3a077cc06013a8505f Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 25 Jul 2013 12:36:00 -0700 Subject: [PATCH] Over-zealously removed necessary if statement in awk script --- base/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/Makefile b/base/Makefile index 80fe6af162b5b..64cef54a83d41 100644 --- a/base/Makefile +++ b/base/Makefile @@ -7,7 +7,7 @@ PCRE_CONST = 0x[0-9a-fA-F]+|[-+]?\s*[0-9]+ version_string = $(shell cat ../VERSION) commit = $(shell git rev-parse HEAD 2>/dev/null) commit_short = $(shell git rev-parse --short HEAD 2>/dev/null) -build_number = $(shell echo $$(git describe --tags --long 2>/dev/null) | awk -F- '{print $$(NF-1);}') +build_number = $(shell echo $$(git describe --tags --long 2>/dev/null) | awk -F- '{ if( NF > 1 ) print $$(NF-1); else print 0; }') git_tag = $(shell git describe --tags --abbrev=0 2>/dev/null) prerelease = $(shell [ -z "$(git_tag)" -o "$(git_tag)" = "v$(version_string)" ] && echo false || echo true)