Skip to content
Snippets Groups Projects
Commit 2400d88d authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

fix urls

parent feda5c15
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
PAGEURL="https://r3.pages.uni.lu/school/theme"
PAGEURL="https://r3.pages.uni.lu/outreach/presentations"
rootDir=$(pwd)
echo $rootDir
......@@ -22,17 +22,9 @@ do
# create the required folders in public
mkdir $rootDir/public
mkdir $rootDir/public/$BLADE
# determine the folder of the branch
dirName="unstable"
if [[ $CI_COMMIT_REF_NAME == "develop" ]]; then
dirName="latest"
elif [[ $CI_COMMIT_REF_NAME == "master" ]]; then
dirName="stable"
fi
# make the local folder
mkdir $rootDir/public/$BLADE/$dirName
mkdir $rootDir/public/$BLADE/unstable
mkdir $rootDir/public/$BLADE/latest
mkdir $rootDir/public/$BLADE/stable
# change to the blade directory to be built
cd $BLADE
......@@ -41,11 +33,10 @@ do
npm install -g npm@latest yo grunt-cli generator-reveal
npm install
if [[ $dirName == "unstable" ]]; then
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/$dirName/.
fi
# build the unstable version - can be optimized
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/unstable/.
# build the master version into stable
git fetch --tags
......@@ -53,7 +44,7 @@ do
git checkout $latestTag
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/$dirName/.
mv public/* $rootDir/public/$BLADE/stable/.
# build the develop version into latest
git checkout -f develop
......@@ -61,7 +52,7 @@ do
git reset --hard origin/develop
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/$dirName/.
mv public/* $rootDir/public/$BLADE/latest/.
# auto redirect file to the stable version
echo '<html>\n
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment