fix: allow Makefile to work on Windows (#11015)

This commit is contained in:
Joshua Powers 2022-04-21 14:56:18 -06:00 committed by GitHub
parent 6ba3b1e91e
commit 5c98cb2aad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -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