Skip to content
Open
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
38 changes: 31 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | s
MODULE_TYPE ?= providers
FLAGD_TESTBED = flagd-testbed
FLAGD_SYNC = sync-testbed
GOLANGCI_LINT_VERSION := v1.64.8

workspace-init:
go work init
Expand All @@ -10,17 +11,10 @@ workspace-init:
workspace-update:
$(foreach module, $(ALL_GO_MOD_DIRS), go work use $(module);)

test:
go list -f '{{.Dir}}/...' -m | xargs -I{} go test -v {}

# call with TESTCONTAINERS_RYUK_DISABLED="true" to avoid problems with podman on Macs
e2e:
go clean -testcache && go list -f '{{.Dir}}/...' -m | xargs -I{} go test -tags=e2e {}

lint:
go install -v github.com/golangci/golangci-lint/cmd/[email protected]
$(foreach module, $(ALL_GO_MOD_DIRS), ${GOPATH}/bin/golangci-lint run $(module)/...;)

new-provider:
mkdir ./providers/$(MODULE_NAME)
cd ./providers/$(MODULE_NAME) && go mod init github.com/open-feature/go-sdk-contrib/providers/$(MODULE_NAME) && touch README.md
Expand All @@ -34,3 +28,33 @@ new-hook:
append-to-release-please:
jq '.packages += {"${MODULE_TYPE}/${MODULE_NAME}": {"release-type":"go","package-name":"${MODULE_TYPE}/${MODULE_NAME}","bump-minor-pre-major":true,"bump-patch-for-minor-pre-major":true,"versioning":"default","extra-files": []}}' release-please-config.json > tmp.json
mv tmp.json release-please-config.json

.PHONY: go-mod-tidy
go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%)
go-mod-tidy/%: DIR=$*
go-mod-tidy/%:
@echo "go mod tidy in $(DIR)" \
&& cd $(DIR) \
&& go mod tidy

.PHONY: lint
lint: golangci-lint

.PHONY: golangci-lint golangci-lint-fix
golangci-lint-fix: ARGS=--fix
golangci-lint-fix: golangci-lint
golangci-lint: $(ALL_GO_MOD_DIRS:%=golangci-lint/%)
golangci-lint/%: DIR=$*
golangci-lint/%:
@echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \
&& cd $(DIR) \
&& go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --allow-serial-runners $(ARGS)

.PHONY: test
test-verbose: ARGS=-v
test: $(ALL_GO_MOD_DIRS:%=test/%)
test/%: DIR=$*
test/%:
@echo "go test $(ARGS) $(DIR)/..." \
&& cd $(DIR) \
&& go test $(ARGS) ./...
2 changes: 0 additions & 2 deletions providers/flagd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/open-feature/go-sdk-contrib/providers/flagd

go 1.23.0

toolchain go1.24.4

require (
buf.build/gen/go/open-feature/flagd/connectrpc/go v1.18.1-20250529171031-ebdc14163473.1
buf.build/gen/go/open-feature/flagd/grpc/go v1.5.1-20250529171031-ebdc14163473.2
Expand Down
2 changes: 0 additions & 2 deletions providers/flagsmith/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/open-feature/go-sdk-contrib/providers/flagsmith

go 1.23.0

toolchain go1.24.4

require (
github.com/Flagsmith/flagsmith-go-client/v4 v4.4.0
github.com/open-feature/go-sdk v1.15.1
Expand Down
2 changes: 0 additions & 2 deletions providers/go-feature-flag/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/open-feature/go-sdk-contrib/providers/go-feature-flag

go 1.23.0

toolchain go1.24.4

require (
github.com/bluele/gcache v0.0.2
github.com/open-feature/go-sdk v1.15.1
Expand Down
2 changes: 0 additions & 2 deletions providers/launchdarkly/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/open-feature/go-sdk-contrib/providers/launchdarkly

go 1.23.0

toolchain go1.24.4

require (
github.com/hooklift/assert v0.1.0
github.com/launchdarkly/go-sdk-common/v3 v3.1.0
Expand Down
Loading