Closed umitanuki closed 3 years ago
Just wanted to drop a note that I'd love to do the work to make this happen. I'll circle back in a few days with some thoughts -- I need to get more familiar with pgxn in general.
That said, any thoughts you have on this issue or direction you can provide would be helpful.
I can see two ways to do this:
regarding 1): The original request was to use the .zip that GitHub already makes available for a release. Were you thinking more work would be required?
regarding 2): Thinking about "pluggable", could it just be generalized to git clone && zip -r
?
Thinking out loud: As far as using the GitHub release .zips, I suppose that would work just fine for extensions that are designed to be built from source and whose repo mimics a usable structure for building against PGXS. For extensions that want to release in binary (ie, mine!), I'm not sure this would be all that useful, but that is the developer's choice, not pgxn's -- and I suspect these are the exception anyways.
As an aside, does pgxn-client work on Windows?
regarding 1): The original request was to use the .zip that GitHub already makes available for a release. Were you thinking more work would be required?
Oh, right. Even easier, then: just download the zip and then upload it to PGXN. The upload facility is already in pgxnutils.
regarding 2): Thinking about "pluggable", could it just be generalized to git clone && zip -r?
If it's just a Git URL and branch name, sure.
As an aside, does pgxn-client work on Windows?
Dunno. @dvarrazzo?
could (1) be generalized into "download .zip file from random URL?" That's how GitHub exposes it: https://github.com/user/project/archive/tagname.zip
If so, that eliminates any kind of GitHub-specific attributes, and then it's probably just a few lines of code in pgxnutils (which of course I haven't even looked at yet).
Sure, works for me.
Actually sudo pgxn install https://github.com/dvarrazzo/pgmp/archive/rel-1.0.2.zip
already works...
Well, there you go, mission accomplished! :-)
@dvarrazzo Oh, sorry, this ticket is about releasing an extension from a Zip file URL, not installing an extension from a URL. :-)
I made some tools to automate the building and releasing of PGXN extensions on both GitHub and on PGXN:
Automate Postgres Extension Releases on GitHub and PGXN
I think that about covers it. It's not as automated as Go packages, but with a bit of actions integration, one can fully automate the release process. See the semver example and see what you think.
As GitHub allows download from tagged revision in zip format, PGXN manager should be able to release from there directly.