Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Dec 9, 2023
1 parent b86c076 commit d2b6bc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/get-matrix.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env -S pkgx deno run -A

import { hooks } from "pkgx"
import { hooks, utils } from "pkgx"
import { isString, isArray } from "is-what"

const project = Deno.args[0]
const pkg = utils.pkg.parse(Deno.args[0])

const rv = {} as Record<string, any>
for (const platform of await get_platforms(project)) {
for (const platform of await get_platforms(pkg)) {
const key = platform.replace('/', '+')
rv[key] = get_matrix(platform)
}
Expand All @@ -23,7 +23,7 @@ if (ghout) {
///////////////////////////////////////////////////////////////////////

//TODO should be in libpkgx!
async function get_platforms(pkg: string) {
async function get_platforms(pkg: {project: string}) {
let { platforms } = await hooks.usePantry().project(pkg).yaml()
if (!platforms) return ["linux/x86-64", "linux/aarch64", "darwin/x86-64", "darwin/aarch64"]
if (isString(platforms)) platforms = [platforms]
Expand Down

0 comments on commit d2b6bc0

Please sign in to comment.