poggit icon indicating copy to clipboard operation
poggit copied to clipboard

Add an api getter for latest dev builds without providing a commit hash or resource id input

Open xBeastMode opened this issue 3 years ago • 2 comments

Add a way to get latest dev builds without giving commit hash or resource id input. Just like you can do with poggit/get/plugin-name, add poggit/build/author/repository which throws the phar automatically. This could be useful for things such as adding a github workflow that uploads a release asset, instead of having to build the release manually from the workflow: you have to also manually update virions in the workflow, which can give room for vulnerabilities in virions if not updated to latest version and it's gets tedious having to maually update them on workflows. This can all be evaded with my suggestion above.

xBeastMode avatar Aug 28 '22 04:08 xBeastMode

yes, I would like to add such an API too. just need more slaves for that.

SOF3 avatar Aug 28 '22 05:08 SOF3

see poggit/get/plugin-name/dev for now

JaxkDev avatar Sep 17 '22 19:09 JaxkDev

poggit/build/author/repository alone won't suffice due to multiple projects in a single repo (hence the virion naming being author/repo/project) but I'm still a little confused, for plugins you can use the above (poggit/get/plugin-name/dev) for virions I'll have to check and come back to you

JaxkDev avatar Jun 08 '23 20:06 JaxkDev

/v.dl/:owner/:repo/:project/:semver

SOF3 avatar Jun 09 '23 01:06 SOF3

the /get/plugin-name/dev looks up the unique release name from the released plugin list. the dev build is retrieved from the repo used to release the plugin.

SOF3 avatar Jun 09 '23 01:06 SOF3

could add p.dl with same parameters as v.dl

JaxkDev avatar Jun 09 '23 02:06 JaxkDev

Sure, if anyone wants to implement it. But plugins do not have the semantic versioning like virions do, so the mechanism is slightly different (but probably even simpler).

With that effort though, perhaps it's easier to just write a GitHub workflow to stage the phar to the repo's GitHub pages?

SOF3 avatar Jun 09 '23 03:06 SOF3

Sure, if anyone wants to implement it. But plugins do not have the semantic versioning like virions do, so the mechanism is slightly different (but probably even simpler).

With that effort though, perhaps it's easier to just write a GitHub workflow to stage the phar to the repo's GitHub pages?

I was thinking either specifying dev or version to download instead of semver

JaxkDev avatar Jun 09 '23 10:06 JaxkDev

Downloading a version doesn't make sense. If it is versioned, it is already released.

SOF3 avatar Jun 09 '23 10:06 SOF3

Downloading a version doesn't make sense. If it is versioned, it is already released.

Yeah true, get/ already exists for released plugins

JaxkDev avatar Jun 09 '23 10:06 JaxkDev

So I’m thinking p.dl/author/repo/project/?buildId (option BuildId otherwise latest dev)

JaxkDev avatar Jun 09 '23 10:06 JaxkDev