This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 50addb4a4 fix(go/adbc/pkg): add PowerShell option to run when
executing in a Windows-based ADO pipeline (#3124)
50addb4a4 is described below
commit 50addb4a49c1a0d2792987099fdc6ccc49b26fc9
Author: davidhcoe <[email protected]>
AuthorDate: Fri Jul 11 01:49:56 2025 +0200
fix(go/adbc/pkg): add PowerShell option to run when executing in a
Windows-based ADO pipeline (#3124)
When running from the PowerShell script as part of an ADO pipeline, the
line
```
GIT_VERSION=$(shell git tag ...
```
was generating the error:
```
EXEC : error : malformed object name '--sort=-v:refname'
[C:\__w\1\s\arrow-adbc\csharp\src\Drivers\Interop\FlightSql\Apache.Arrow.Adbc.Drivers.Interop.FlightSql.csproj]
```
This change swaps some of the commands but also has a separate
PowerShell command for the Windows OS instead of the shell command.
---------
Co-authored-by: David Coe <>
---
go/adbc/pkg/Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/go/adbc/pkg/Makefile b/go/adbc/pkg/Makefile
index 5c0990326..7cf8ffc11 100644
--- a/go/adbc/pkg/Makefile
+++ b/go/adbc/pkg/Makefile
@@ -28,7 +28,13 @@ else
SUFFIX=dylib
endif
-GIT_VERSION=$(shell git tag -l --points-at $(shell git rev-list --tags
--max-count=1) --sort=-v:refname | head -n 1)
+ifeq ($(shell go env GOOS),windows)
+ GIT_VERSION := $(shell powershell -Command "git tag --sort=-v:refname
--points-at $$(git rev-list --tags --max-count=1) | Select-Object -First 1")
+else
+ GIT_VERSION=$(shell git tag -l --points-at $(shell git rev-list --tags
--max-count=1) --sort=-v:refname | head -n 1)
+endif
+
+GIT_VERSION ?= unknown
VERSION=$(subst go/adbc/,,$(GIT_VERSION))
# Expand dynamically libadbc_driver_.SUFFIX