Commit b0fe3db7 authored by schneider210's avatar schneider210 Committed by mrodzis
Browse files

fix: patch the entrypoint for the Ahikar demo / dev branch

parent 071b2762
......@@ -14,6 +14,7 @@ build_test:
- develop
stage: build
script:
- ./set_entrypoint_ci.sh
- npm install
- npm run build
- npm run tweak:build
......@@ -28,6 +29,7 @@ build_main_and_develop:
- develop
stage: build
script:
- ./set_entrypoint_ci.sh
- npm install
- npm run build
- npm run tweak:build
......
#!/bin/bash
# this script sets the entrypoint for TIDO
#
# reason: if an entrypoint is provided, it will be compiled and integrated into the build
# the build takes precedence and prevents the according config option to take effect
# on the the other hand, the entrypoint is needed for the demo page to show data
# https://subugoe.pages.gwdg.de/emo/Qviewer/develop/#/
echo CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
case $CI_COMMIT_REF_NAME in
main)
# placeholder for upcoming patches in the main branch
;;
develop)
echo 'set entrypoint for develop ...'
ENTRY_POINT=https://subugoe.pages.gwdg.de/emo/backend/sampledata/collection.json
sed -ri 's|.*("entrypoint"\s*:).*$|\t\t\t\1 "'${ENTRY_POINT}'",|' src/index.template.html
;;
*)
echo "set entrypoint for testing"
# TIDO is developed in the context of the Ahiqar project, therefore we use the Ahiqar data for
# development purposes.
ENTRY_POINT=https://ahikar-test.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json
sed -ri 's|.*("entrypoint"\s*:).*$|\t\t\t\1 "'${ENTRY_POINT}'",|' src/index.template.html
;;
esac
[ $? -eq 0 ] && exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment