refactor: move app to monorepo

This commit is contained in:
2023-03-14 17:05:09 +01:00
parent 2f65ebf57f
commit 54ed0a2f27
775 changed files with 89 additions and 156 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env sh
# Adds a preedefined script tag including the merge current request id to the angular web app index.html.
# This enables the interactive gitlab review toolbar.
MERGE_REQUEST_ID=""
if echo -n $3 | grep -Eq '[0-9]+$'; then
MERGE_REQUEST_ID="$(echo -n "$3" | grep -Eo '[0-9]+$')"
fi
INDEX_PATH=$(dirname $1)
SCRIPT_TAG="<script defer data-project-id=\"$2\" data-project-path=\"openstapps/app\" data-merge-request-id=\"$MERGE_REQUEST_ID\" data-mr-url=\"https://gitlab.com\" id=\"review-app-toolbar-script\" src=\"visual_review_toolbar.js\"></script>"
curl https://gitlab.com/assets/webpack/visual_review_toolbar.js --output "$INDEX_PATH/visual_review_toolbar.js" --silent
sed -i -e "\@</head>@i\\$SCRIPT_TAG" $1