Commit 2400d88d authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

fix urls

parent feda5c15
#!/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
# build the unstable version - can be optimized
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/$dirName/.
fi
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
......
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