You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
682 B
Plaintext
29 lines
682 B
Plaintext
3 years ago
|
def by_time: sort_by(.created_at) | reverse;
|
||
|
|
||
|
def asset($os; $arch):
|
||
|
.assets[]
|
||
|
| select(.name | test($os))
|
||
|
| select(.name | test($arch))
|
||
|
;
|
||
|
|
||
|
def latest: by_time | limit(1; .[]);
|
||
|
def latest_body: latest | .body;
|
||
|
def latest_version: latest | .tag_name;
|
||
|
|
||
|
def latest_asset($os; $arch): latest | asset($os; $arch);
|
||
|
def latest_download($os; $arch): latest_asset($os; $arch) | .browser_download_url;
|
||
|
def latest_type($os; $arch): latest_asset($os; $arch) | .content_type;
|
||
|
|
||
|
def summary($os; $arch):
|
||
|
"\((.name | select(. != "")) // .tag_name // .id)
|
||
|
created at: \(.created_at)
|
||
|
assets
|
||
|
\(
|
||
|
[ asset($os; $arch)
|
||
|
| .name
|
||
|
| " → \(.)"
|
||
|
] | join("\n")
|
||
|
)
|
||
|
";
|
||
|
|