-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update pgrx, clerk-rs, chrono; support Postgres 17
- Loading branch information
Showing
4 changed files
with
64 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
[package] | ||
name = "clerk_fdw" | ||
version = "0.3.2" | ||
version = "0.3.3" | ||
edition = "2021" | ||
publish = false | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[features] | ||
default = ["pg16"] | ||
default = ["pg17"] | ||
pg14 = ["pgrx/pg14", "pgrx-tests/pg14", "supabase-wrappers/pg14"] | ||
pg15 = ["pgrx/pg15", "pgrx-tests/pg15", "supabase-wrappers/pg15"] | ||
pg16 = ["pgrx/pg16", "pgrx-tests/pg16", "supabase-wrappers/pg16"] | ||
pg17 = ["pgrx/pg17", "pgrx-tests/pg17", "supabase-wrappers/pg17"] | ||
pg_test = [] | ||
|
||
[dependencies] | ||
backoff = { version = "0.4.0", features = ["tokio"] } | ||
chrono = "0.4.26" | ||
clerk-rs = "0.3.0" | ||
pgrx = "=0.11.3" | ||
chrono = "0.4.38" | ||
clerk-rs = "0.4.0" | ||
pgrx = "=0.12.6" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
supabase-wrappers = { git = "https://github.com/supabase/wrappers.git", default-features = false } | ||
supabase-wrappers = { version = "0.1.20", default-features = false } | ||
tokio = { version = "1", features = ["full"] } | ||
|
||
[dev-dependencies] | ||
pgrx-tests = "=0.11.3" | ||
pgrx-tests = "=0.12.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,54 @@ | ||
PGRX_POSTGRES ?= pg16 | ||
DISTNAME = $(shell grep -m 1 '^name' Trunk.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/') | ||
PG_CONFIG ?= $(shell which pg_config) | ||
PGRXV = $(shell perl -nE '/^pgrx\s+=\s"=?([^"]+)/ && do { say $$1; exit }' Cargo.toml) | ||
PGV = $(shell perl -E 'shift =~ /(\d+)/ && say $$1' "$(shell $(PG_CONFIG) --version)") | ||
DISTNAME = $(shell grep -m 1 '^name' Trunk.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/') | ||
DISTVERSION = $(shell grep -m 1 '^version' Trunk.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/') | ||
|
||
all: package | ||
|
||
.DEFAULT_GOAL: package # Build for the PostgreSQL cluster identified by pg_config. | ||
package: | ||
@cargo pgrx package --pg-config "$(PG_CONFIG)" | ||
|
||
.PHONY: install # Install jsonschema into the PostgreSQL cluster identified by pg_config. | ||
install: | ||
@cargo pgrx install --release --pg-config "$(PG_CONFIG)" | ||
|
||
.PHONY: test # Run the full test suite against the PostgreSQL version identified by pg_config. | ||
test: | ||
@cargo test --all --no-default-features --features "pg$(PGV) pg_test" -- --nocapture | ||
|
||
clean: | ||
@rm -rf META.json $(DISTNAME)-$(DISTVERSION).zip | ||
|
||
.PHONY: pg-version # Print the current PGRX version from Cargo.toml | ||
pgrx-version: | ||
@echo $(PGRXV) | ||
|
||
.PHONY: pg-version # Print the current Postgres version reported by pg_config. | ||
pg-version: Cargo.toml | ||
@echo $(PGV) | ||
|
||
.PHONY: install-pgrx # Install the version of PGRX specified in Cargo.toml. | ||
install-pgrx: Cargo.toml | ||
@cargo install --locked cargo-pgrx --version "$(PGRXV)" | ||
|
||
.PHONY: pgrx-init # Initialize pgrx for the PostgreSQL version identified by pg_config. | ||
pgrx-init: Cargo.toml | ||
@cargo pgrx init "--pg$(PGV)"="$(PG_CONFIG)" | ||
|
||
.PHONY: lint # Format and lint. | ||
lint: | ||
@cargo fmt --all --check | ||
@cargo clippy --features "pg$(PGV)" --no-default-features | ||
|
||
# Create the PGXN META.json file. | ||
META.json: META.json.in Cargo.toml | ||
@sed "s/@CARGO_VERSION@/$(DISTVERSION)/g" $< > $@ | ||
|
||
# Create a PGXN-compatible zip file. | ||
$(DISTNAME)-$(DISTVERSION).zip: META.json | ||
git archive --format zip --prefix $(DISTNAME)-$(DISTVERSION)/ --add-file $< -o $(DISTNAME)-$(DISTVERSION).zip HEAD | ||
|
||
## pgxn-zip: Create a PGXN-compatible zip file. | ||
pgxn-zip: $(DISTNAME)-$(DISTVERSION).zip | ||
|
||
clean: | ||
@rm -rf META.json $(DISTNAME)-$(DISTVERSION).zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters