Skip to content

Commit 8690c86

Browse files
author
Edmundo Alvarez
committed
Clear website contents before updating
1 parent 8e7fb00 commit 8690c86

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/bash
2-
set -e
2+
set -ex
33

44
ORIGINAL_PATH=$PWD
55
SERVER_PATH=/tmp/server
66

77
git clone git://github.com/Graylog2/graylog2-server.git $SERVER_PATH
88
cd $SERVER_PATH
9+
SERVER_SHA=$(git rev-parse HEAD)
910
mvn -f graylog2-server/pom.xml clean frontend:install-node-and-yarn frontend:yarn
1011

1112
cd graylog2-web-interface
@@ -16,9 +17,10 @@ node ./node/yarn/dist/bin/yarn.js run docs:build
1617

1718
cd $ORIGINAL_PATH
1819
git checkout gh-pages
20+
rm -r ./*
1921
cp -r $SERVER_PATH/graylog2-web-interface/docs/styleguide/* ./
2022
git add -A
21-
git commit -m "Update website"
23+
git commit -m "Update website to $SERVER_SHA"
2224
git push origin gh-pages
2325

2426
exit 0

0 commit comments

Comments
 (0)