forked from ObeoNetwork/UML-Designer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis-promote.sh
32 lines (31 loc) · 946 Bytes
/
travis-promote.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
set -e
if [ $TRAVIS_PULL_REQUEST == 'false' ]
then
echo "Build $TRAVIS_JOB_NUMBER"
echo "Git: $TRAVIS_COMMIT [$TRAVIS_BRANCH]"
echo "Root dir: $TRAVIS_BUILD_DIR"
cd $TRAVIS_BUILD_DIR
echo "Promote umldesigner.org web site -- Start"
echo "Clone UML Designer repo"
git clone https://[email protected]/ObeoNetwork/UML-Designer.git -b gh-pages --quiet
cd UML-Designer/
echo "Remove the old version of the web site"
git rm -rf *
ls
echo "Copy new generated web site"
cp -r ../documentation/_site/* .
ls
rm -rf ../documentation/_site/
echo "Promote umldesigner.org web site -- End"
git config user.email "[email protected]"
git config user.name "Mélanie Bats"
git status
git add .
git commit -m "Promoting new website for https://github.com/ObeoNetwork/UML-Designer/commit/$TRAVIS_COMMIT [$TRAVIS_BRANCH]"
git status
echo "cat .git/config"
cat .git/config
echo "git push origine gh-pages"
git push origin gh-pages
echo "Build promoted."
fi