From 971c0a2dc404047c72c1e0f15f96d3d38df688ae Mon Sep 17 00:00:00 2001 From: Jamie Wong Date: Thu, 5 Apr 2018 00:50:45 -0700 Subject: [PATCH] More tweaks to release process --- application.tsx | 6 +++++- release.sh | 9 +++------ tsconfig.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/application.tsx b/application.tsx index a5218a2..ff2a4f5 100644 --- a/application.tsx +++ b/application.tsx @@ -13,6 +13,10 @@ import {Flamechart} from './flamechart' import { FlamechartView } from './flamechart-view' import { FontFamily, FontSize, Colors } from './style' + +declare function require(x: string): any +const exampleProfileURL = require('./sample/perf-vertx-stacks-01-collapsed-all.txt') + const enum SortOrder { CHRONO, LEFT_HEAVY @@ -286,7 +290,7 @@ export class Application extends ReloadableComponent<{}, ApplicationState> { loadExample = () => { this.setState({ loading: true }) const filename = 'perf-vertx-stacks-01-collapsed-all.txt' - fetch(filename).then(resp => resp.text()).then(data => { + fetch(exampleProfileURL).then(resp => resp.text()).then(data => { this.loadFromString(filename, data) }) } diff --git a/release.sh b/release.sh index 8d73b06..8a0ad00 100755 --- a/release.sh +++ b/release.sh @@ -7,7 +7,6 @@ # Fail on first error set -e -COMMITHASH=`git rev-parse HEAD` OUTDIR=`pwd`/dist/release echo $OUTDIR @@ -18,11 +17,9 @@ node_modules/.bin/tsc --noEmit rm -rf "$OUTDIR" mkdir -p "$OUTDIR" -# Place the current commit into the build dir to easiy identify releases -git rev-parse HEAD > "$OUTDIR"/commit - -# Copy a couple of static files into the release directory -cp sample/perf-vertx-stacks-01-collapsed-all.txt "$OUTDIR" +# Place info about the current commit into the build dir to easiy identify releases +date > "$OUTDIR"/release.txt +git rev-parse HEAD >> "$OUTDIR"/release.txt # Build the compiled assets node_modules/.bin/parcel build index.html --out-dir "$OUTDIR" --detailed-report diff --git a/tsconfig.json b/tsconfig.json index e106f15..96cd14b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "module": "es2015", + "module": "commonjs", "strict": true, "jsx": "react", "noUnusedLocals": true,