Skip to content

Commit da52f26

Browse files
author
David Coe
committed
add Windows option; rearrange commands
1 parent 573a326 commit da52f26

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/adbc/pkg/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ RM := rm -f
2121

2222
ifeq ($(shell go env GOOS),linux)
2323
SUFFIX=so
24+
GIT_VERSION=$(shell git tag --sort=-v:refname --points-at $(shell git rev-list --tags --max-count=1 2>/dev/null) 2>/dev/null | head -n 1)
2425
else ifeq ($(shell go env GOOS),windows)
2526
SUFFIX=dll
2627
RM=del
28+
GIT_VERSION=$(shell powershell -Command "git tag --sort=-v:refname --points-at $(git rev-list --tags --max-count=1) | Select-Object -First 1")
2729
else
2830
SUFFIX=dylib
2931
endif
3032

31-
GIT_VERSION=$(shell git tag -l --points-at $(shell git rev-list --tags --max-count=1) --sort=-v:refname | head -n 1)
33+
GIT_VERSION ?= unknown
3234
VERSION=$(subst go/adbc/,,$(GIT_VERSION))
3335

3436
# Expand dynamically libadbc_driver_.SUFFIX

0 commit comments

Comments
 (0)