mirror of
https://github.com/jlfwong/speedscope.git
synced 2024-11-22 12:53:23 +03:00
Fix deploy
This commit is contained in:
parent
e630b21420
commit
f4d14e55d0
11
deploy.sh
11
deploy.sh
@ -22,18 +22,19 @@ date > "$OUTDIR"/release.txt
|
|||||||
git rev-parse HEAD >> "$OUTDIR"/release.txt
|
git rev-parse HEAD >> "$OUTDIR"/release.txt
|
||||||
|
|
||||||
# Build the compiled assets
|
# Build the compiled assets
|
||||||
node_modules/.bin/parcel build index.html --out-dir "$OUTDIR" --detailed-report
|
node_modules/.bin/parcel build index.html --out-dir "$OUTDIR" --public-url /speedscope/ --detailed-report
|
||||||
|
|
||||||
# Create a shallow clone of the repository
|
# Create a shallow clone of the repository
|
||||||
TMPDIR=`mktemp -d -t speedscope-release`
|
TMPDIR=`mktemp -d -t speedscope-release`
|
||||||
echo "Entering $TMPDIR"
|
echo "Entering $TMPDIR"
|
||||||
pushd "$TMPDIR"
|
pushd "$TMPDIR"
|
||||||
git clone --depth 1 git@github.com:jlfwong/speedscope.git -b gh-pages
|
git clone --depth 1 git@github.com:jlfwong/speedscope.git -b gh-pages
|
||||||
cd speedscope
|
|
||||||
rm -rf *
|
|
||||||
|
|
||||||
# Copy the build artifacts into the shallow clone
|
# Copy the build artifacts into the shallow clone
|
||||||
|
pushd speedscope
|
||||||
|
rm -rf *
|
||||||
cp -R "$OUTDIR"/* .
|
cp -R "$OUTDIR"/* .
|
||||||
|
popd
|
||||||
|
|
||||||
# Set up a handler to run on Ctrl+C
|
# Set up a handler to run on Ctrl+C
|
||||||
trap ctrl_c INT
|
trap ctrl_c INT
|
||||||
@ -41,10 +42,12 @@ function ctrl_c() {
|
|||||||
read -p "Commit release? [yes/no]: "
|
read -p "Commit release? [yes/no]: "
|
||||||
if [[ $REPLY =~ ^yes$ ]]
|
if [[ $REPLY =~ ^yes$ ]]
|
||||||
then
|
then
|
||||||
|
pushd speedscope
|
||||||
git add --all
|
git add --all
|
||||||
git commit -m 'Release'
|
git commit -m 'Release'
|
||||||
git push origin HEAD:gh-pages
|
git push origin HEAD:gh-pages
|
||||||
popd
|
popd
|
||||||
|
popd
|
||||||
rm -rf "$TMPDIR"
|
rm -rf "$TMPDIR"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
@ -58,7 +61,7 @@ function ctrl_c() {
|
|||||||
# Start a local server for verification of the build
|
# Start a local server for verification of the build
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "Build complete. Starting server on http://localhost:4444/"
|
echo "Build complete. Starting server on http://localhost:4444/speedscope/"
|
||||||
echo "Hit Ctrl+C to complete or cancel the release"
|
echo "Hit Ctrl+C to complete or cancel the release"
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user