From 824724387cedd9d7d83131b4f466824ba19dae7a Mon Sep 17 00:00:00 2001 From: Doug Lauder Date: Wed, 16 Nov 2022 08:12:05 -0500 Subject: [PATCH] require build tag to include sqlite (#4213) Co-authored-by: Mattermod --- Makefile | 2 +- server/services/store/sqlstore/blocks.go | 1 - server/services/store/sqlstore/data_retention.go | 1 - server/services/store/sqlstore/sqlite.go | 5 +++++ 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 server/services/store/sqlstore/sqlite.go diff --git a/Makefile b/Makefile index 891efb2bf..7cab81b8b 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ ifeq ($(BUILD_NUMBER),) BUILD_DATE := n/a endif -BUILD_TAGS += json1 +BUILD_TAGS += json1 sqlite3 LDFLAGS += -X "github.com/mattermost/focalboard/server/model.BuildNumber=$(BUILD_NUMBER)" LDFLAGS += -X "github.com/mattermost/focalboard/server/model.BuildDate=$(BUILD_DATE)" diff --git a/server/services/store/sqlstore/blocks.go b/server/services/store/sqlstore/blocks.go index e84d1b6ed..361128eca 100644 --- a/server/services/store/sqlstore/blocks.go +++ b/server/services/store/sqlstore/blocks.go @@ -10,7 +10,6 @@ import ( sq "github.com/Masterminds/squirrel" _ "github.com/lib/pq" // postgres driver "github.com/mattermost/focalboard/server/model" - _ "github.com/mattn/go-sqlite3" // sqlite driver "github.com/mattermost/mattermost-server/v6/shared/mlog" ) diff --git a/server/services/store/sqlstore/data_retention.go b/server/services/store/sqlstore/data_retention.go index 402df0fc6..519a2d7c1 100644 --- a/server/services/store/sqlstore/data_retention.go +++ b/server/services/store/sqlstore/data_retention.go @@ -12,7 +12,6 @@ import ( sq "github.com/Masterminds/squirrel" _ "github.com/lib/pq" // postgres driver "github.com/mattermost/focalboard/server/model" - _ "github.com/mattn/go-sqlite3" // sqlite driver "github.com/mattermost/mattermost-server/v6/shared/mlog" ) diff --git a/server/services/store/sqlstore/sqlite.go b/server/services/store/sqlstore/sqlite.go new file mode 100644 index 000000000..8f63feaa8 --- /dev/null +++ b/server/services/store/sqlstore/sqlite.go @@ -0,0 +1,5 @@ +//go:build sqlite3 + +package sqlstore + +import _ "github.com/mattn/go-sqlite3" // sqlite driver