ponyup icon indicating copy to clipboard operation
ponyup copied to clipboard

Add find command

Open Theodus opened this issue 4 years ago • 2 comments

using the Cloudsmith package querying API. This command should return a limited set of the results from Cloudsmith.

Theodus avatar Jul 21 '20 18:07 Theodus

I propose this command work in the following manner.

ponyc and Markdown table formatting used for example. This should work the same for any core Pony tool on Cloudsmith and precise formatting at CLI may change (i.e., no header, tab separated, command separated, whatever makes the most sense following discussion).

ponyup find <tool>

Return the most recent versions in each channel for current default platform.

Options

Name Argument Function
a N/a Returns versions for all platforms
n U8 Returns the latest n versions
platform String Overrides the default platform

Minimal return: ponyup find ponyc

Tool Channel Version Platform
ponyc release 0.35.1 x86_64-linux-gnu
ponyc nightly 20200722 x86_64-linux-gnu

Note it is sorted release first.

W/ --platform option: ponyup find --platform=x86-64-apple-darwin ponyc

Tool Channel Version Platform
ponyc release 0.35.1 x86-64-apple-darwin
ponyc nightly 20200722 x86-64-apple-darwin

Note it is sorted release first.

W/ -a option: ponyup find -a ponyc

Tool Channel Version Platform
ponyc release 0.35.1 unknown-linux-musl
ponyc nightly 20200722 unknown-linux-musl
ponyc release 0.35.1 x86-64-apple-darwin
ponyc nightly 20200722 x86-64-apple-darwin
ponyc release 0.35.1 x86_64-linux-gnu
ponyc nightly 20200722 x86_64-linux-gnu
... ... ... ...

Note that it is sorted by platform.

W/ -n option: ponyup find -n 2 ponyc

Tool Channel Version Platform
ponyc release 0.35.1 x86_64-linux-gnu
ponyc release 0.35.0 x86_64-linux-gnu
ponyc nightly 20200722 x86_64-linux-gnu
ponyc nightly 20200721 x86_64-linux-gnu

Note it is sorted from newest to oldest version.

W/ -n and -a: ponyup find -a -n 2 ponyc

Tool Channel Version Platform
ponyc release 0.35.1 unknown-linux-musl
ponyc release 0.35.0 unknown-linux-musl
ponyc nightly 20200722 unknown-linux-musl
ponyc nightly 20200721 unknown-linux-musl
ponyc release 0.35.1 x86-64-apple-darwin
ponyc release 0.35.0 x86-64-apple-darwin
ponyc nightly 20200722 x86-64-apple-darwin
ponyc nightly 20200721 x86-64-apple-darwin
ponyc release 0.35.1 x86_64-linux-gnu
ponyc release 0.35.0 x86_64-linux-gnu
ponyc nightly 20200722 x86_64-linux-gnu
ponyc nightly 20200721 x86_64-linux-gnu
... ... ... ...

Note it is sorted by platform then newest to oldest version.


rhagenson avatar Jul 22 '20 23:07 rhagenson

@rhagenson that seems good to me.

Theodus avatar Jul 28 '20 18:07 Theodus