Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,32 @@ $location = Get-Location

$file = "libadbc_driver_flightsql.dll"

if(Test-Path $file)
{
if (Test-Path $file) {
exit
}

cd ..\..\..\..\..\go\adbc\pkg
try {
Set-Location ..\..\..\..\..\go\adbc\pkg

make $file
make $file

if(Test-Path $file)
{
$processes = Get-Process | Where-Object { $_.Modules.ModuleName -contains $file }
if (Test-Path $file) {
$processes = Get-Process | Where-Object { $_.Modules.ModuleName -contains $file }

if ($processes.Count -eq 0) {
try {
# File is not being used, copy it to the destination
Copy-Item -Path $file -Destination $location
Write-Host "File copied successfully."
if ($processes.Count -eq 0) {
try {
# File is not being used, copy it to the destination
Copy-Item -Path $file -Destination $location
Write-Host "File copied successfully."
}
catch {
Write-Host "Caught error: $_"
}
}
catch {
Write-Host "Caught error: $_"
else {
Write-Host "File is being used by another process. Cannot copy."
}
} else {
Write-Host "File is being used by another process. Cannot copy."
}
} finally {
Set-Location $location
}
2 changes: 1 addition & 1 deletion go/adbc/pkg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ DRIVERS := $(addsuffix .$(SUFFIX),$(addprefix libadbc_driver_,$(MANAGERS)))
all: $(DRIVERS)

libadbc_driver_%.$(SUFFIX): % ../driver/% ../go.mod ../go.sum
$(GO_BUILD) -buildvcs=true -tags driverlib -o $@ -buildmode=c-shared -ldflags "-s -w -X github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase.infoDriverVersion=$(VERSION)" ./$*
$(GO_BUILD) -buildvcs=true -tags driverlib -o $@ -buildmode=c-shared -ldflags "-X github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase.infoDriverVersion=$(VERSION)" ./$*
$(RM) $(basename $@).h

regenerate:
Expand Down
Loading