Skip to content
Snippets Groups Projects

Regular merge of develop

Merged Laurent Heirendt requested to merge develop into master
4 files
+ 157
56
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 10
51
#!/bin/bash
PAGEURL="https://r3.pages.uni.lu/school/courses"
PAGEURL="https://courses.lcsb.uni.lu"
rootDir=$(pwd)
echo $rootDir
@@ -9,11 +9,13 @@ echo $rootDir
rm -rf $rootDir/public
mkdir $rootDir/public
# create img folders
mkdir $rootDir/public/img
mkdir $rootDir/public/img/unstable
mkdir $rootDir/public/img/latest
mkdir $rootDir/public/img/stable
if [[ $CI_COMMIT_BRANCH == "develop" ]]; then
version="latest";
elif [[ $CI_COMMIT_BRANCH == "master" ]]; then
version="stable";
else
version="unstable";
fi
# loop through all the presentations
nBlades=0
@@ -26,16 +28,12 @@ do
do
if [[ ${#d1} -ge 2 ]]; then
let "nBlades+=1"
#blades[$nBlades]="$tutorial"
BLADE=${d1:2}
echo " > -----------------------------------------------------"
echo "Building ... ${d1}"
# create the required folders in public
mkdir $rootDir/public/$BLADE
mkdir $rootDir/public/$BLADE/unstable
mkdir $rootDir/public/$BLADE/latest
mkdir $rootDir/public/$BLADE/stable
mkdir -p $rootDir/public/$BLADE/$version
# change to the blade directory to be built
cd $BLADE
@@ -50,50 +48,11 @@ do
ln -s ../../theme theme
# install npm
#npm install -g npm@latest yo grunt-cli generator-reveal
#npm install
yarn global add grunt-cli generator-reveal
yarn install
grunt dist
mv public/* $rootDir/public/$BLADE/unstable/.
# link to the img directory
mv $rootDir/public/$BLADE/unstable/slides/img/* $rootDir/public/img/unstable/.
rm -rf $rootDir/public/$BLADE/unstable/slides/img
ln -s ../../../img/unstable $rootDir/public/$BLADE/unstable/slides/img
echo " > unstable built for file set ${BLADE}"
# build the master version into stable
git fetch --tags
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
git stash
git checkout $latestTag
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/stable/.
# link to the img directory
mv $rootDir/public/$BLADE/stable/slides/img/* $rootDir/public/img/stable/.
rm -rf $rootDir/public/$BLADE/stable/slides/img
ln -s ../../../img/stable $rootDir/public/$BLADE/stable/slides/img
echo " > stable built for file set ${BLADE}"
# build the develop version into latest
git stash
git checkout -f develop
git fetch origin develop
git reset --hard origin/develop
git submodule update --init
grunt dist
mv public/* $rootDir/public/$BLADE/latest/.
# link to the img directory
mv $rootDir/public/$BLADE/latest/slides/img/* $rootDir/public/img/latest/.
rm -rf $rootDir/public/$BLADE/latest/slides/img
ln -s ../../../img/latest $rootDir/public/$BLADE/latest/slides/img
mv public/* $rootDir/public/$BLADE/$version/.
echo " > latest built for file set ${BLADE}"
Loading