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

fix urls

parent feda5c15
#!/bin/bash #!/bin/bash
PAGEURL="https://r3.pages.uni.lu/school/theme" PAGEURL="https://r3.pages.uni.lu/outreach/presentations"
rootDir=$(pwd) rootDir=$(pwd)
echo $rootDir echo $rootDir
...@@ -22,17 +22,9 @@ do ...@@ -22,17 +22,9 @@ do
# create the required folders in public # create the required folders in public
mkdir $rootDir/public mkdir $rootDir/public
mkdir $rootDir/public/$BLADE mkdir $rootDir/public/$BLADE
mkdir $rootDir/public/$BLADE/unstable
# determine the folder of the branch mkdir $rootDir/public/$BLADE/latest
dirName="unstable" mkdir $rootDir/public/$BLADE/stable
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
# change to the blade directory to be built # change to the blade directory to be built
cd $BLADE cd $BLADE
...@@ -41,11 +33,10 @@ do ...@@ -41,11 +33,10 @@ do
npm install -g npm@latest yo grunt-cli generator-reveal npm install -g npm@latest yo grunt-cli generator-reveal
npm install npm install
if [[ $dirName == "unstable" ]]; then # build the unstable version - can be optimized
git submodule update --init git submodule update --init
grunt dist grunt dist
mv public/* $rootDir/public/$BLADE/$dirName/. mv public/* $rootDir/public/$BLADE/unstable/.
fi
# build the master version into stable # build the master version into stable
git fetch --tags git fetch --tags
...@@ -53,7 +44,7 @@ do ...@@ -53,7 +44,7 @@ do
git checkout $latestTag git checkout $latestTag
git submodule update --init git submodule update --init
grunt dist grunt dist
mv public/* $rootDir/public/$BLADE/$dirName/. mv public/* $rootDir/public/$BLADE/stable/.
# build the develop version into latest # build the develop version into latest
git checkout -f develop git checkout -f develop
...@@ -61,7 +52,7 @@ do ...@@ -61,7 +52,7 @@ do
git reset --hard origin/develop git reset --hard origin/develop
git submodule update --init git submodule update --init
grunt dist grunt dist
mv public/* $rootDir/public/$BLADE/$dirName/. mv public/* $rootDir/public/$BLADE/latest/.
# auto redirect file to the stable version # auto redirect file to the stable version
echo '<html>\n 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