mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
Fix uploads
This commit is contained in:
parent
fe002f9b9f
commit
7ef92d3d54
3 changed files with 7 additions and 6 deletions
|
@ -54,11 +54,12 @@ for (const rq of dry) {
|
|||
}
|
||||
}
|
||||
|
||||
const to = usePrefix()
|
||||
await set_output("pkgs", rv.map(x => pkgutils.str(x.installation.pkg)))
|
||||
await set_output("paths", rv.map(x => x.installation.path), '%0A')
|
||||
await set_output("relative-paths", rv.map(x => x.installation.path.relative({ to: usePrefix() })))
|
||||
await set_output("srcs", rv.map(x => x.src?.relative({ to: usePrefix() }) ?? "~"))
|
||||
await set_output("srcs-actual", rv.compact(x => x.src?.relative({ to: usePrefix() })))
|
||||
await set_output("relative-paths", rv.map(x => x.installation.path.relative({ to })))
|
||||
await set_output("srcs", rv.map(x => x.src?.relative({ to }) ?? "~"))
|
||||
await set_output("srcs-relative-paths", rv.compact(x => x.src?.relative({ to })))
|
||||
|
||||
interface InstallationPlus extends Installation {
|
||||
src: Path
|
||||
|
|
|
@ -24,7 +24,7 @@ const pantry = usePantry()
|
|||
const { download } = useDownload()
|
||||
|
||||
export async function fetch_src(pkg: Package): Promise<[Path, Path] | undefined> {
|
||||
const dstdir = useCellar().shelf(pkg.project).parent().join("src", `v${pkg.version}`)
|
||||
const dstdir = useCellar().shelf(pkg.project).join("src", `v${pkg.version}`)
|
||||
const dist = await pantry.getDistributable(pkg)
|
||||
if (!dist) return
|
||||
const { url, stripComponents } = dist
|
||||
|
|
|
@ -12,7 +12,7 @@ args:
|
|||
|
||||
import { S3 } from "s3"
|
||||
import { pkg as pkgutils } from "utils"
|
||||
import { useFlags, useOffLicense, useCache } from "hooks"
|
||||
import { useFlags, useOffLicense, useCache, usePrefix } from "hooks"
|
||||
import { Package, PackageRequirement } from "types"
|
||||
import SemVer, * as semver from "semver"
|
||||
import { dirname, basename } from "deno/path/mod.ts"
|
||||
|
@ -82,7 +82,7 @@ for (const [index, pkg] of pkgs.entries()) {
|
|||
|
||||
// mirror the sources
|
||||
if (srcs[index] != "~") {
|
||||
const src = new Path(srcs[index])
|
||||
const src = usePrefix().join(srcs[index])
|
||||
const srcKey = useOffLicense('s3').key({
|
||||
pkg: stowed.pkg,
|
||||
type: "src",
|
||||
|
|
Loading…
Reference in a new issue