Skip to content

Commit

Permalink
Merge pull request #91 from teaxyz/smaller-downloads
Browse files Browse the repository at this point in the history
Smaller downloads
  • Loading branch information
mxcl authored Oct 23, 2022
2 parents 910fa32 + b9863f5 commit ab134e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ that part; it’s going to *change the world*.
 


# tea/cli 0.8.11
# tea/cli 0.8.12

tea is a universal virtual‑environment manager:

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/usePantry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ async function install(): Promise<true | 'not-git' | 'noop'> {
try {
if (prefix.exists()) return 'noop' // another instance of tea did it
await run({
cmd: [git, "clone", "https://github.com/teaxyz/pantry", "."],
cmd: [git, "clone", "--depth=1", "https://github.com/teaxyz/pantry", "."],
cwd, env
})
} finally {
Expand Down
7 changes: 5 additions & 2 deletions src/prefab/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ export default async function install(pkg: Package): Promise<Installation> {
const cellar = useCellar()
const { verbosity } = useFlags()
const dstdir = usePrefix()
const stowage = StowageNativeBottle({ pkg: { project, version }, compression: 'gz' })
const compression = host().platform == 'darwin' ? 'xz' : 'gz'
const stowage = StowageNativeBottle({ pkg: { project, version }, compression })
const url = useOffLicense('s3').url(stowage)
const dst = useCache().path(stowage)
const { path: tarball, sha } = await download({ src: url, dst })

//FIXME if we already have the gz or xz versions don’t download the other version!

try {
const url = useOffLicense('s3').url({pkg, compression: 'gz', type: 'bottle'})
const url = useOffLicense('s3').url({pkg, compression, type: 'bottle'})
await sumcheck(sha, new URL(`${url}.sha256sum`))
} catch (err) {
tarball.rm()
Expand Down

0 comments on commit ab134e4

Please sign in to comment.