Fix uploads

This commit is contained in:
Max Howell 2022-10-17 15:20:42 -04:00
parent fe002f9b9f
commit 7ef92d3d54
3 changed files with 7 additions and 6 deletions

View file

@ -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("pkgs", rv.map(x => pkgutils.str(x.installation.pkg)))
await set_output("paths", rv.map(x => x.installation.path), '%0A') 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("relative-paths", rv.map(x => x.installation.path.relative({ to })))
await set_output("srcs", rv.map(x => x.src?.relative({ to: usePrefix() }) ?? "~")) await set_output("srcs", rv.map(x => x.src?.relative({ to }) ?? "~"))
await set_output("srcs-actual", rv.compact(x => x.src?.relative({ to: usePrefix() }))) await set_output("srcs-relative-paths", rv.compact(x => x.src?.relative({ to })))
interface InstallationPlus extends Installation { interface InstallationPlus extends Installation {
src: Path src: Path

View file

@ -24,7 +24,7 @@ const pantry = usePantry()
const { download } = useDownload() const { download } = useDownload()
export async function fetch_src(pkg: Package): Promise<[Path, Path] | undefined> { 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) const dist = await pantry.getDistributable(pkg)
if (!dist) return if (!dist) return
const { url, stripComponents } = dist const { url, stripComponents } = dist

View file

@ -12,7 +12,7 @@ args:
import { S3 } from "s3" import { S3 } from "s3"
import { pkg as pkgutils } from "utils" 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 { Package, PackageRequirement } from "types"
import SemVer, * as semver from "semver" import SemVer, * as semver from "semver"
import { dirname, basename } from "deno/path/mod.ts" import { dirname, basename } from "deno/path/mod.ts"
@ -82,7 +82,7 @@ for (const [index, pkg] of pkgs.entries()) {
// mirror the sources // mirror the sources
if (srcs[index] != "~") { if (srcs[index] != "~") {
const src = new Path(srcs[index]) const src = usePrefix().join(srcs[index])
const srcKey = useOffLicense('s3').key({ const srcKey = useOffLicense('s3').key({
pkg: stowed.pkg, pkg: stowed.pkg,
type: "src", type: "src",