pgxn / pgxn-manager

Interface for managing extensions on PGXN
http://pgxn.org
47 stars 18 forks source link

Release from github release #47

Closed umitanuki closed 3 years ago

umitanuki commented 9 years ago

As GitHub allows download from tagged revision in zip format, PGXN manager should be able to release from there directly.

eeeebbbbrrrr commented 8 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.

theory commented 8 years ago

I can see two ways to do this:

  1. Add a command to pgxnutils that does this. Give it a GitHub username, project name, and tag name, and it would fetch it, zip it, and push it to manager.pgxn.org. This might be easiest if you know Python but not Perl.
  2. Add an interface to pgxn-manager wherein you can paste a GitHub URL and branch name, and then have pgxn-manager fetch it, zip it, etc. Ideally it would be pluggable so it'd be easy to add other services later (e.g., BitBucket). This would be the way to go if you know Perl and not Python (though option 1 could be done later to use this interface), or to avoid requiring the installation of pgxn-client and pgxn-utils.
eeeebbbbrrrr commented 8 years ago

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?

theory commented 8 years ago

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?

eeeebbbbrrrr commented 8 years ago

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).

theory commented 8 years ago

Sure, works for me.

dvarrazzo commented 8 years ago

Actually sudo pgxn install https://github.com/dvarrazzo/pgmp/archive/rel-1.0.2.zip already works...

theory commented 8 years ago

Well, there you go, mission accomplished! :-)

theory commented 8 years ago

@dvarrazzo Oh, sorry, this ticket is about releasing an extension from a Zip file URL, not installing an extension from a URL. :-)

theory commented 3 years ago

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.