Commit 45b83194 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

feature: set entrypoint based on branch

parent d864922e
...@@ -10,6 +10,7 @@ build: ...@@ -10,6 +10,7 @@ build:
# when we want to include the frontend-templating, we have to use recursive # when we want to include the frontend-templating, we have to use recursive
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
script: script:
- ./set-entrypoint.sh
- cp --force index.html Qviewer/src/index.template.html - cp --force index.html Qviewer/src/index.template.html
- cp --force ahikar.css Qviewer/src/statics/ - cp --force ahikar.css Qviewer/src/statics/
- cd Qviewer - cd Qviewer
......
#!/bin/bash
# this script sets the entrypoint for the Qviewer that depends on the
# branch it is build from.
echo CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
case ${CI_COMMIT_REF_NAME} in
"main")
sed -i "s ahikar-test\.sub ahikar.sub g" index.html
echo "set entrypoint for production"
;;
"develop")
sed -i "s ahikar-test\.sub ahikar.sub g" index.html
echo "set entrypoint for develop aka staging"
;;
*)
echo "set entrypoint for testing"
;;
esac
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