Skip to content

Commit

Permalink
Add stuff for releasing and PGXN
Browse files Browse the repository at this point in the history
  • Loading branch information
anayrat committed Feb 10, 2019
1 parent f0a7742 commit b086b95
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
43 changes: 43 additions & 0 deletions META.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "pg_sampletolog",
"abstract": "An extension to sample statements or transactions to logs",
"version": "__VERSION__",
"maintainer": "Adrien Nayrat <[email protected]>",
"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": "[email protected]: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"
]
}
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit b086b95

Please sign in to comment.