mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* chore(deps): backport go-libs migrator index name fix
Pulls in formancehq/go-libs#596 (backport to release/v3.6, tagged as
v3.6.2) which fixes a hardcoded `idx_version_id` name collision between
migrators sharing a schema. The bug crashes services with
`SQLSTATE 42P10` at startup. Affected DBs self-heal on next deploy -
no manual SQL required.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* fix(ci): pin kin-openapi validator to v0.135.0
Backport of the pin already on main (commit 665ca471 / PR #697 EN-979).
v0.136.0+ rejects schemas where `$ref` has sibling fields like
`nullable`, which fails validate-openapi on V3CreatePaymentServiceUserRequest.
Constraint: cannot wrap $ref in allOf -- Speakeasy renames inlined types and breaks the published Go SDK
Rejected: rewrite schema to OAS-strict allOf | breaks SDK consumers
Confidence: high
Scope-risk: narrow
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: fabrice guery <[email protected]>
93 lines
3.3 KiB
Makefile
93 lines
3.3 KiB
Makefile
set dotenv-load
|
|
|
|
default:
|
|
@just --list
|
|
|
|
pre-commit: tidy generate lint openapi compile-plugins compile-connector-capabilities
|
|
pc: pre-commit
|
|
|
|
lint:
|
|
@golangci-lint run --fix --build-tags it --timeout 5m
|
|
|
|
tidy:
|
|
@go mod tidy
|
|
|
|
compile-plugins:
|
|
./tools/compile-plugins/compile-plugin.sh list.go internal/connectors/plugins/public public github.com/formancehq/payments/internal/connectors/plugins/public
|
|
./tools/compile-plugins/compile-plugin.sh list.go ee/plugins plugins github.com/formancehq/payments/ee/plugins
|
|
|
|
[group('openapi')]
|
|
validate-openapi:
|
|
@go run github.com/getkin/kin-openapi/cmd/[email protected] openapi.yaml
|
|
|
|
[group('openapi')]
|
|
compile-connector-configs:
|
|
@go build -o compile-configs {{justfile_directory()}}/tools/compile-configs
|
|
./compile-configs --path {{justfile_directory()}}/internal/connectors/plugins/public --path {{justfile_directory()}}/ee/plugins --output {{justfile_directory()}}/openapi/v3/v3-connectors-config.yaml
|
|
@rm ./compile-configs
|
|
|
|
compile-connector-capabilities:
|
|
@go build -tags ee -o compile-capabilities {{justfile_directory()}}/tools/compile-capabilities
|
|
./compile-capabilities --path {{justfile_directory()}}/internal/connectors/plugins/public --path {{justfile_directory()}}/ee/plugins --output {{justfile_directory()}}/docs/other/connector-capabilities.json
|
|
@rm ./compile-capabilities
|
|
|
|
[group('openapi')]
|
|
compile-api-yaml: compile-connector-configs
|
|
@npx openapi-merge-cli --config {{justfile_directory()}}/openapi/openapi-merge.json
|
|
@yq -oy {{justfile_directory()}}/openapi.json > openapi.yaml
|
|
@rm {{justfile_directory()}}/openapi.json
|
|
|
|
[group('openapi')]
|
|
compile-api-docs:
|
|
@npx openapi-merge-cli --config {{justfile_directory()}}/openapi/openapi-docs-merge.json
|
|
@npx -y widdershins {{justfile_directory()}}/openapi.json -o {{justfile_directory()}}/docs/api/README.md --search false --language_tabs 'http:HTTP' --summary --omitHeader
|
|
@rm {{justfile_directory()}}/openapi.json
|
|
|
|
[group('openapi')]
|
|
openapi: compile-api-yaml compile-api-docs validate-openapi
|
|
|
|
[group('test')]
|
|
tests:
|
|
@go test -race -covermode=atomic \
|
|
-coverprofile coverage.txt \
|
|
-tags it \
|
|
./...
|
|
|
|
[group('test')]
|
|
generate-sdk: openapi
|
|
@export PATH=$PATH:$(go env GOPATH)/bin && cd pkg/client && speakeasy run --skip-versioning
|
|
|
|
[group('test')]
|
|
generate: generate-sdk
|
|
@go generate ./...
|
|
|
|
[group('build')]
|
|
build-ce: compile-plugins
|
|
go build -ldflags "-X github.com/formancehq/payments/cmd.Edition=community" -o payments .
|
|
|
|
[group('build')]
|
|
build-ee: compile-plugins
|
|
go build -tags ee -ldflags "-X github.com/formancehq/payments/cmd.Edition=enterprise" -o payments-ee .
|
|
|
|
[group('releases')]
|
|
release-local:
|
|
@goreleaser release --nightly --skip=publish --clean
|
|
|
|
[group('releases')]
|
|
release-ci:
|
|
@goreleaser release --nightly --clean
|
|
|
|
[group('releases')]
|
|
release:
|
|
@goreleaser release --clean
|
|
|
|
[group('plugins')]
|
|
bootstrap-plugin CONNECTOR_NAME EDITION="public":
|
|
@go build -o connector-template {{justfile_directory()}}/tools/connector-template
|
|
@if [ "{{EDITION}}" = "enterprise" ]; then \
|
|
./connector-template --connector-dir-path {{justfile_directory()}}/ee/plugins --connector-name {{CONNECTOR_NAME}}; \
|
|
else \
|
|
./connector-template --connector-dir-path {{justfile_directory()}}/internal/connectors/plugins/public --connector-name {{CONNECTOR_NAME}}; \
|
|
fi
|
|
@rm ./connector-template
|