DISTNAME = $(shell grep -m 1 '^name' Trunk.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/') DISTVERSION = $(shell grep -m 1 '^version' Cargo.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/') format: cargo fmt --all cargo clippy # run in pgrx locally run: PGLATER_SOCKET_URL='postgresql:///pg_later?host=/Users/${USER}/.pgrx&user=${USER}&dbname=pg_later&port=28815' cargo pgrx run META.json: META.json.in Trunk.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