diff --git a/scripts/build.ts b/scripts/build.ts index 363a1a00..1badd2e7 100755 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -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 diff --git a/scripts/fetch.ts b/scripts/fetch.ts index e1074378..501e258b 100755 --- a/scripts/fetch.ts +++ b/scripts/fetch.ts @@ -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 diff --git a/scripts/upload.ts b/scripts/upload.ts index 9157f22d..e1ec1466 100755 --- a/scripts/upload.ts +++ b/scripts/upload.ts @@ -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",