2018-07-08 07:33:02 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Fail on first error
|
|
|
|
set -e
|
|
|
|
OUTDIR=`pwd`/dist/release
|
|
|
|
|
|
|
|
# Typecheck
|
|
|
|
node_modules/.bin/tsc --noEmit
|
|
|
|
|
|
|
|
# Clean out the release directory
|
|
|
|
rm -rf "$OUTDIR"
|
|
|
|
mkdir -p "$OUTDIR"
|
|
|
|
|
|
|
|
# Place info about the current commit into the build dir to easily identify releases
|
|
|
|
date > "$OUTDIR"/release.txt
|
|
|
|
git rev-parse HEAD >> "$OUTDIR"/release.txt
|
|
|
|
|
|
|
|
# Place a json schema for the file format into the build directory too
|
2018-08-01 10:41:45 +03:00
|
|
|
node scripts/generate-file-format-schema-json.js > "$OUTDIR"/file-format-schema.json
|
2018-07-08 07:33:02 +03:00
|
|
|
|
|
|
|
# Build the compiled assets
|
2018-08-01 10:41:45 +03:00
|
|
|
node_modules/.bin/parcel build assets/index.html --no-cache --out-dir "$OUTDIR" --public-url "./" --detailed-report
|