From b086b9554f91968c9d6c5bb341aed6584233db0f Mon Sep 17 00:00:00 2001 From: anayrat Date: Sun, 10 Feb 2019 11:20:39 +0100 Subject: [PATCH] Add stuff for releasing and PGXN --- META.json | 43 +++++++++++++++++++++++++++++++++++++++++++ Makefile | 12 ++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 META.json diff --git a/META.json b/META.json new file mode 100644 index 0000000..d3b4cec --- /dev/null +++ b/META.json @@ -0,0 +1,43 @@ +{ + "name": "pg_sampletolog", + "abstract": "An extension to sample statements or transactions to logs", + "version": "__VERSION__", + "maintainer": "Adrien Nayrat ", + "license": "postgresql", + "release_status": "testing", + "provides": { + "pg_stat_kcache": { + "abstract": "An extension to sample statements or transactions to logs", + "file": "pg_sampletolog.c", + "docfile": "README.md", + "version": "__VERSION__" + } + }, + "resources": { + "bugtracker": { + "web": "https://github.com/anayrat/pg_sampletolog/issues" + }, + "repository": { + "url": "git@github.com:anayrat/pg_sampletolog.git", + "web": "https://github.com/anayrat/pg_sampletolog", + "type": "git" + } + }, + "prereqs": { + "runtime": { + "requires": { + "PostgreSQL": "9.4.0" + } + } + }, + "generated_by": "Adrien Nayrat", + "meta-spec": { + "version": "1.0.0", + "url": "http://pgxn.org/meta/spec.txt" + }, + "tags": [ + "logging", + "log", + "sampling" + ] +} diff --git a/Makefile b/Makefile index a567e9e..19984f6 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,22 @@ EXTENSION = pg_sampletolog +EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/") TESTS = $(wildcard sql/*.sql) REGRESS = $(patsubst sql/%.sql,%,$(TESTS)) MODULE_big = pg_sampletolog OBJS = pg_sampletolog.o +all: + +release-zip: all + git archive --format zip --prefix=$(EXTENSION)-${EXTVERSION}/ --output ./$(EXTENSION)-${EXTVERSION}.zip HEAD + unzip ./$(EXTENSION)-$(EXTVERSION).zip + rm ./$(EXTENSION)-$(EXTVERSION).zip + rm ./$(EXTENSION)-$(EXTVERSION)/.gitignore + sed -i -e "s/__VERSION__/$(EXTVERSION)/g" ./$(EXTENSION)-$(EXTVERSION)/META.json + zip -r ./$(EXTENSION)-$(EXTVERSION).zip ./$(EXTENSION)-$(EXTVERSION)/ + rm ./$(EXTENSION)-$(EXTVERSION) -rf + PG_CONFIG = pg_config