fix: improve Makefile and duckdb.go for better environment handling
- Updated the Makefile to export the EDITION variable for the lite build process, ensuring proper environment setup. - Added a defer statement in duckdb.go to ensure the SQL database connection is closed after use, improving resource management. These changes enhance the build process and resource handling in the application.main
parent
7b7017ec03
commit
2a5cf57589
5
Makefile
5
Makefile
|
|
@ -248,8 +248,9 @@ build-lite:
|
|||
else \
|
||||
echo ">> No frontend/package.json, skipping frontend"; \
|
||||
fi
|
||||
EDITION=lite eval "$$(./scripts/get_version.sh env)"; \
|
||||
LDFLAGS="$$(EDITION=lite ./scripts/get_version.sh ldflags)"; \
|
||||
export EDITION=lite; \
|
||||
eval "$$(./scripts/get_version.sh env)"; \
|
||||
LDFLAGS="$$(./scripts/get_version.sh ldflags)"; \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-Wno-deprecated-declarations" \
|
||||
CGO_LDFLAGS="-Wl,-no_warn_duplicate_libraries" \
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ func downloadSpatial() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer sqlDB.Close()
|
||||
|
||||
// Try to install spatial extension (may already be installed or network unavailable)
|
||||
installSQL := "INSTALL spatial;"
|
||||
|
|
|
|||
Loading…
Reference in New Issue