mirror of
https://github.com/ivabus/pantry
synced 2024-11-13 03:55:18 +03:00
18 lines
467 B
TypeScript
Executable file
18 lines
467 B
TypeScript
Executable file
#!/usr/bin/env -S pkgx deno run --allow-net
|
|
|
|
const [project] = Deno.args
|
|
|
|
let versions: string[] = []
|
|
|
|
for (const platform of ["linux", "darwin"]) {
|
|
for (const arch of ["x86-64", "aarch64"]) {
|
|
const url = `https://dist.pkgx.dev/${project}/${platform}/${arch}/versions.txt`
|
|
const txt = await (await fetch(url)).text()
|
|
versions.push(...txt.split("\n"))
|
|
}
|
|
}
|
|
|
|
versions = [...new Set(versions.filter(x => x.trim()))]
|
|
|
|
console.log(JSON.stringify(versions))
|