From b05fa5ac4e7d87b508eaafdbae092bb90f25fba1 Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Thu, 21 Apr 2022 14:56:18 -0600 Subject: [PATCH] fix: allow Makefile to work on Windows (#11015) --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6087961245d6b..7962c6a5633c4 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,11 @@ -next_version := $(shell cat build_version.txt) -tag := $(shell git describe --exact-match --tags 2>git_describe_error.tmp; rm -f git_describe_error.tmp) +ifeq ($(OS),Windows_NT) + next_version := $(shell type build_version.txt) + tag := $(shell git describe --exact-match --tags 2> nul) +else + next_version := $(shell cat build_version.txt) + tag := $(shell git describe --exact-match --tags 2>/dev/null) +endif + branch := $(shell git rev-parse --abbrev-ref HEAD) commit := $(shell git rev-parse --short=8 HEAD) glibc_version := 2.17