Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ results/
regression.diffs
regression.out
*.diff

# PGXN release archives
plruby-*.zip
17 changes: 17 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,20 @@ and TRANSFORM FOR TYPE ltree (Ruby Array of label Strings):

All three accept the same PG_CONFIG/RUBY overrides and have their own
"make installcheck".

6. Packaging for PGXN (maintainers)
-----------------------------------

META.json describes the distribution for PGXN (https://pgxn.org): its version,
the four extensions it provides, and where the sources live. Build the release
archive from a committed tree with:

make dist

That writes plruby-<version>.zip, taking the version from META.json, and the
archive expands into a single plruby-<version>/ directory, which is the shape
PGXN Manager expects at https://manager.pgxn.org/upload.

When cutting a release, keep the "version" field in META.json in step with
plruby.control and the CHANGELOG, and the "provides" versions in step with the
per-extension .control files.
70 changes: 70 additions & 0 deletions META.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"name": "plruby",
"abstract": "Ruby as a procedural language for PostgreSQL",
"description": "PL/Ruby is a procedural language handler that embeds an MRI Ruby interpreter in the PostgreSQL backend, so functions, set-returning functions, triggers, event triggers, and procedures can be written in Ruby. Arguments and results are converted to and from native Ruby values, including nested Arrays and composites as Hashes, and numeric as a lossless String. Database access is provided through SPI (queries, prepared statements, cursors, transaction control, and subtransactions). The distribution also ships three optional TRANSFORM FOR TYPE extensions for jsonb, hstore, and ltree. PL/Ruby is untrusted: Ruby has no sandbox since 3.0 removed $SAFE, so the extension is superuser-only to install.",
"version": "2.5.0",
"maintainer": [
"Joshua D. Drake <jd@commandprompt.com>"
],
"license": "mit",
"provides": {
"plruby": {
"abstract": "Ruby as a procedural language for PostgreSQL",
"file": "plruby--2.5.sql",
"docfile": "doc/plruby.md",
"version": "2.5.0"
},
"jsonb_plruby": {
"abstract": "Transform between jsonb and native Ruby data",
"file": "jsonb_plruby/jsonb_plruby--1.0.sql",
"version": "1.0.0"
},
"hstore_plruby": {
"abstract": "Transform between hstore and Ruby Hashes",
"file": "hstore_plruby/hstore_plruby--1.0.sql",
"version": "1.0.0"
},
"ltree_plruby": {
"abstract": "Transform between ltree and Ruby Arrays",
"file": "ltree_plruby/ltree_plruby--1.0.sql",
"version": "1.0.0"
}
},
"prereqs": {
"runtime": {
"requires": {
"PostgreSQL": "11.0.0"
}
}
},
"resources": {
"homepage": "https://github.com/commandprompt/plruby",
"bugtracker": {
"web": "https://github.com/commandprompt/plruby/issues"
},
"repository": {
"url": "https://github.com/commandprompt/plruby.git",
"web": "https://github.com/commandprompt/plruby",
"type": "git"
}
},
"generated_by": "Joshua D. Drake",
"tags": [
"ruby",
"mri",
"procedural language",
"plruby",
"stored procedures",
"triggers",
"spi",
"transform",
"jsonb",
"hstore",
"ltree"
],
"meta-spec": {
"version": "1.0.0",
"url": "https://pgxn.org/meta/spec.txt"
},
"release_status": "stable"
}
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,14 @@ REGRESS = init base types numspecial bytea composite encoding datetime jsonb mis
PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)

# Release archive for PGXN (https://pgxn.org). The version is read from
# META.json so it cannot drift from the distribution metadata; the archive
# holds the committed tree, so commit (and tag) before building it.
DIST_VERSION := $(shell grep -m1 '"version"' META.json | sed -e 's/[^0-9.]//g')

.PHONY: dist
dist:
git archive --format=zip --prefix=plruby-$(DIST_VERSION)/ \
-o plruby-$(DIST_VERSION).zip HEAD
@echo "wrote plruby-$(DIST_VERSION).zip"
Loading