forked from tembo-io/pgmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (20 loc) · 948 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
PGRX_POSTGRES ?= pg16
DISTNAME = $(shell grep -m 1 '^name' Cargo.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/')
DISTVERSION = $(shell grep -m 1 '^version' Cargo.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/')
PG_VERSION:=16
PGRX_PG_CONFIG =$(shell cargo pgrx info pg-config ${PGRX_POSTGRES})
test:
cargo pgrx test $(PGRX_POSTGRES)
cargo test --no-default-features --features ${PGRX_POSTGRES} -- --test-threads=1 --ignored
format:
cargo +nightly fmt --all
cargo +nightly clippy
run.postgres:
docker run -d --name pgmq-pg -e POSTGRES_PASSWORD=postgres -p 5432:5432 quay.io/tembo/pgmq-pg:latest
META.json: META.json.in Cargo.toml
@sed "s/@CARGO_VERSION@/$(DISTVERSION)/g" $< > $@
$(DISTNAME)-$(DISTVERSION).zip: META.json
git archive --format zip --prefix $(DISTNAME)-$(DISTVERSION)/ --add-file $< -o $(DISTNAME)-$(DISTVERSION).zip HEAD
pgxn-zip: $(DISTNAME)-$(DISTVERSION).zip
clean:
@rm -rf META.json $(DISTNAME)-$(DISTVERSION).zip