Skip to content

Commit

Permalink
chore: unpack tarball for bundlesize (#1037)
Browse files Browse the repository at this point in the history
gzip compresses slightly different each time
  • Loading branch information
jdx committed Oct 2, 2018
1 parent 0535f31 commit e62771b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ jobs:
command: ./node_modules/.bin/lerna exec "curl -s https://codecov.io/bash | bash"
- run:
name: Build tarball for BundleSize
command: |
cp yarn.lock packages/cli
cd packages/cli
./node_modules/.bin/oclif-dev pack --no-xz --targets ''
command: ./scripts/bundlesize
- store_artifacts:
path: ./packages/cli/dist
path: ./bundlesize.tar
release:
<<: *defaults
steps:
Expand Down
21 changes: 21 additions & 0 deletions scripts/bundlesize
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -ex

ROOT=$(pwd)

mkdir -p "$ROOT/bundlesize"
echo {} > "$ROOT/bundlesize/package.json"

tarballs=()
for pkg in $(ls packages); do
cd "$ROOT/packages/$pkg"
yarn pack --filename pack.tar.gz &
tarballs+=("$ROOT/packages/$pkg/pack.tar.gz")
done

wait
cd "$ROOT/bundlesize"
yarn add ${tarballs[*]}
mv node_modules bundlesize
tar -cf "$ROOT/bundlesize.tar" bundlesize

0 comments on commit e62771b

Please sign in to comment.