File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- OUTPUT_DIR=" dist"
3+ SCRIPTS_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
4+ OUTPUT_DIR=$SCRIPTS_DIR " /../dist"
5+ WORK_DIR=$SCRIPTS_DIR " /../tmp"
46BASE_URL=" http://localhost:5500"
57
68if compgen -G " data/*.xlsx" > /dev/null; then
79 ./scripts/generate-rdf-build-miravi.sh $BASE_URL
810
11+ echo " Moving Miravi dist to docs"
12+ rm -rf docs && mkdir docs
13+ mv $WORK_DIR /ap-data-to-dashboard/node_modules/miravi/main/dist/* $OUTPUT_DIR " /docs"
14+
915 echo " 1. Host RDF files via \" npx http-server $OUTPUT_DIR /output -p 5500 --cors true\" "
1016 echo " 2. Host Miravi via \" npx http-server $OUTPUT_DIR /docs -p 8080\" "
1117 echo " 3. Browse to http://localhost:8080"
Original file line number Diff line number Diff line change @@ -32,10 +32,6 @@ cd ap-data-to-dashboard
3232./run.sh -u $BASE_URL
3333cd $OUTPUT_DIR
3434
35- echo " Moving Miravi dist to docs"
36- rm -rf docs && mkdir docs
37- mv $WORK_DIR /ap-data-to-dashboard/node_modules/miravi/main/dist/* docs
38-
3935echo " Moving RDF and mappings"
4036rm -rf output
4137mkdir output
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ SCRIPTS_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
34FORBIDDEN_BRANCH_NAMES=(" assets" " queries" " images" )
45CURRENT_BRANCH=$1
56USE_DIST=$2
6- WORKDIR= " dist "
7+ WORK_DIR= $SCRIPTS_DIR " /../tmp "
78
89# Sanitize branch
910CURRENT_BRANCH=${CURRENT_BRANCH// \/ / -}
@@ -18,7 +19,7 @@ if [[ "$CURRENT_BRANCH" == "main" ]]; then
1819 rm -rf gh-pages/assets gh-pages/images gh-pages/queries
1920
2021 if [[ " $USE_DIST " == " true" ]]; then
21- mv $WORKDIR /ap-data-to-dashboard/node_modules/miravi/main/dist/* gh-pages
22+ mv $WORK_DIR /ap-data-to-dashboard/node_modules/miravi/main/dist/* gh-pages
2223 else
2324 cp scripts/dashboard-placeholder.html gh-pages/index.html
2425 fi
2829 mkdir -p gh-pages/$CURRENT_BRANCH
2930
3031 if [[ " $USE_DIST " == " true" ]]; then
31- mv $WORKDIR /ap-data-to-dashboard/node_modules/miravi/main/dist/* gh-pages/$CURRENT_BRANCH
32+ mv $WORK_DIR /ap-data-to-dashboard/node_modules/miravi/main/dist/* gh-pages/$CURRENT_BRANCH
3233 else
3334 cp scripts/dashboard-placeholder.html gh-pages/$CURRENT_BRANCH /index.html
3435 fi
You can’t perform that action at this time.
0 commit comments