diff --git a/csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1 b/csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1 index fd7dee0690..67b92d22e4 100644 --- a/csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1 +++ b/csharp/src/Drivers/Interop/FlightSql/Build-FlightSqlDriver.ps1 @@ -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 } diff --git a/go/adbc/pkg/Makefile b/go/adbc/pkg/Makefile index 4f834ab736..fc31007aa7 100644 --- a/go/adbc/pkg/Makefile +++ b/go/adbc/pkg/Makefile @@ -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: