forked from h2oai/db-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sh
executable file
·38 lines (30 loc) · 972 Bytes
/
publish.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
33
34
35
36
37
38
#!/bin/bash
set -o errexit -o nounset
publishGhPages(){
rm -rf db-benchmark.gh-pages
mkdir -p db-benchmark.gh-pages
cd db-benchmark.gh-pages
## Set up Repo parameters
git init > /dev/null
git config user.name "publish.gh-pages"
git config user.email "publish.gh-pages@h2o.ai"
## Set gh token from local file
GH_TOKEN=`cat ../token` 2>err.txt
## Reset gh-pages branch
git remote add upstream "https://$GH_TOKEN@github.com/h2oai/db-benchmark.git" 2>err.txt
git fetch -q upstream gh-pages 2>err.txt
rm -f err.txt
git checkout -q gh-pages
git reset -q --hard "f2d1593f0e760f0526ce2d8759d16955f29e2c6b" 2>err.txt
rm -f err.txt
cp -r ../public/* ./
git add -A
git commit -q -m 'publish benchmark report' 2>err.txt
cp ../time.csv .
cp ../logs.csv .
git add time.csv logs.csv 2>err.txt
git commit -q -m 'publish benchmark timings and logs' 2>err.txt
git push --force upstream gh-pages 2>err.txt
cd ..
}
publishGhPages