2022-09-08 23:40:35 +03:00
|
|
|
#!/usr/bin/env -S tea -E
|
|
|
|
|
|
|
|
/*---
|
|
|
|
args:
|
|
|
|
- deno
|
|
|
|
- run
|
|
|
|
- --allow-net
|
|
|
|
- --allow-run
|
|
|
|
- --allow-read
|
|
|
|
- --allow-write={{ tea.prefix }}
|
2022-09-14 00:53:12 +03:00
|
|
|
- --allow-env=GITHUB_TOKEN,TEA_PREFIX
|
2022-09-08 23:40:35 +03:00
|
|
|
- --import-map={{ srcroot }}/import-map.json
|
|
|
|
---*/
|
|
|
|
|
|
|
|
import { bottle } from "./bottle.ts"
|
|
|
|
import { ls } from "./ls.ts"
|
|
|
|
import useCellar from "hooks/useCellar.ts"
|
|
|
|
|
|
|
|
const cellar = useCellar()
|
|
|
|
|
|
|
|
for await (const {path} of ls()) {
|
|
|
|
const pkg = (await cellar.resolve(path)).pkg
|
|
|
|
try {
|
|
|
|
await bottle({ path, pkg })
|
|
|
|
} catch (error) {
|
|
|
|
console.verbose({ 'bottling-failure': pkg, error })
|
|
|
|
}
|
|
|
|
}
|