-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-gh.sh
More file actions
62 lines (49 loc) · 2.06 KB
/
update-gh.sh
File metadata and controls
62 lines (49 loc) · 2.06 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
if [ "$TRAVIS_COMMIT_MESSAGE" != "Travis build pushed to Matrix3 master" ]; then
echo -e "Starting to update Matrix 3 master\n"
#moving files created in build into home
#moving scripts to be run into home
cp -R test* $HOME
cp -R time* $HOME
cp -R refBench $HOME
cp -R normFromRef.py $HOME
cp -R plotScript.py $HOME
cd $HOME
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis"
#cloning the relevant repo
git clone --quiet --branch=master https://${TOKEN}@github.com/Esmae/Matrices3.git master> /dev/null
#normalising the benchmarking data just collected
python normFromRef.py
#python script produces a graph of the results
python plotScript.py
#attaching the time and date to the data files
today=$(date +%Y-%m-%d_%H-%M)
mv testIJK testIJK."$today"
mv testIKJ testIKJ."$today"
mv master/normData/testIJKNorm master/normData/testIJKNorm."$today"
mv master/normData/testIKJNorm master/normData/testIKJNorm."$today"
#putting the files in local repo
cp -Rf $HOME/test* master/data
cp -Rf $HOME/CompPlot* master/figures
cp -Rf $HOME/refBench master
#need to change the python script if change the name of the folder the clone is going into (currently it's called master)
#calls the python script that creates the 'with time' plot
python timePlot50.py
python timePlot100.py
python timePlot500.py
#putting the new 'with time' plot in the repo (possibly overwritting the latest one)
cp -Rf TimePlot50.png master/figures
cp -Rf TimePlotTen50.png master/figures
cp -Rf TimePlot100.png master/figures
cp -Rf TimePlotTen100.png master/figures
cp -Rf TimePlot500.png master/figures
cp -Rf TimePlotTen500.png master/figures
cd master
#adding the new files and changing files so they are ready to commit
git add -f --ignore-removal .
#commiting the added changes
git commit -m "Travis build pushed to Matrix3 master"
#pushes the changes the github on the master branch of Matrices3
git push -fq https://${TOKEN}@github.com/Esmae/Matrices3.git master > /dev/null
echo -e "Success? \n"
fi