Skip to content
Snippets Groups Projects
Verified Commit bd7f9369 authored by Martin Weise's avatar Martin Weise
Browse files

Debug

parent b1a65d1b
Branches
Tags
No related merge requests found
#!/bin/bash #!/bin/bash
INDEX_HTML=""
OVERRIDES_MAIN_HTML="" OVERRIDES_MAIN_HTML=""
SCRIPTS_EXTRA_JS="" SCRIPTS_EXTRA_JS=""
...@@ -15,7 +14,6 @@ function generate_docs { ...@@ -15,7 +14,6 @@ function generate_docs {
find .docs/ -type f -exec sed -i -e "s/__APPVERSION__/$1/g" {} \; find .docs/ -type f -exec sed -i -e "s/__APPVERSION__/$1/g" {} \;
find .docs/ -type f -exec sed -i -e "s/__CHARTVERSION__/$1/g" {} \; find .docs/ -type f -exec sed -i -e "s/__CHARTVERSION__/$1/g" {} \;
if [ "$1" = "latest" ]; then if [ "$1" = "latest" ]; then
INDEX_HTML=$(cat .docs/redirect.html)
OVERRIDES_MAIN_HTML=$(cat .docs/overrides/main.html) OVERRIDES_MAIN_HTML=$(cat .docs/overrides/main.html)
SCRIPTS_EXTRA_JS=$(cat .docs/scripts/extra.js) SCRIPTS_EXTRA_JS=$(cat .docs/scripts/extra.js)
else else
...@@ -71,8 +69,6 @@ done ...@@ -71,8 +69,6 @@ done
# finalization # finalization
echo "===================================================" echo "==================================================="
echo "Adding index.html from branch release-latest" echo "Moving default version $APP_VERSION docs to /"
echo $INDEX_HTML > .docs/redirect.html cp -r ./final/${APP_VERSION}/* ./final/
sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" .docs/redirect.html
cp ./.docs/redirect.html ./final/index.html
echo "===================================================" echo "==================================================="
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Redirect Notice</title> <title>Redirect Notice</title>
<meta http-equiv="Refresh" content="10; url='//localhost:8000/infrastructures/dbrepo/__APPVERSION__/'" /> <meta http-equiv="Refresh" content="0; url='/infrastructures/dbrepo/__APPVERSION__/'" />
</head> </head>
<body> <body>
<h1>Redirect Notice</h1> <h1>Redirect Notice</h1>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
available at: available at:
</p> </p>
<p> <p>
<a href="//localhost:8000/infrastructures/dbrepo/__APPVERSION__/">//localhost:8000/infrastructures/dbrepo/__APPVERSION__/</a> <a href="/infrastructures/dbrepo/__APPVERSION__/">/infrastructures/dbrepo/__APPVERSION__/</a>
</p> </p>
</body> </body>
</html> </html>
\ No newline at end of file
function getVersion() { function getVersion() {
const segments = location.pathname.split('/'); const segments = location.pathname.split('/');
if (segments.length >= 4) { if (segments.length >= 4) {
console.log('version', segments[3])
return segments[3]; return segments[3];
} else { } else {
console.log('default version __APPVERSION__')
return '__APPVERSION__'; return '__APPVERSION__';
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment