Files
SpeedScope/scripts/prepare-test-installation.sh
2025-01-15 14:47:40 -08:00

20 lines
402 B
Bash
Executable File

#!/bin/bash
# Prepare a mock installation of speedscope to test it before the actual npm
# publish
set -euxo pipefail
TESTDIR=`mktemp -d -t speedscope-test-installation`
PACKEDNAME=`npm pack | tail -n1`
mv "$PACKEDNAME" "$TESTDIR"
cd "$TESTDIR"
tar -xvvf "$PACKEDNAME"
cd package
npm install
set +x
echo
echo "Run the following command to switch into the test directory"
echo cd "$TESTDIR"/package