mirror of
https://github.com/embarklabs/web3.js.git
synced 2026-08-30 22:21:10 +00:00
32 lines
1.2 KiB
Bash
Executable File
32 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# --------------------------------------------------------------------
|
|
# Publishes a small test site that uses the packages/web3/dist/min
|
|
# --------------------------------------------------------------------
|
|
|
|
if [ -z "$CI" ]; then
|
|
|
|
echo "======================================================================"
|
|
echo "This script publishes a test site with surge.sh. Only run in CI."
|
|
echo "======================================================================"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "======================================================================"
|
|
echo "Publishing test site with surge.sh. See link below. "
|
|
echo "======================================================================"
|
|
|
|
cp packages/web3/dist/web3.min.js scripts/html
|
|
cd scripts
|
|
(echo "" && exit && cat ) | npx surge --domain sudden-playground.surge.sh html
|
|
|
|
# Might be running locally in development
|
|
rm html/web3.min.js
|
|
|
|
# Sometimes surge.sh fails with an auth error because it's generated a name which
|
|
# is already taken (or something?) This test is just meant to be a visual
|
|
# inspection check if/when there are doubts - we don't want it crash CI alot.
|
|
exit 0
|