forked from nexusformat/definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins_build
executable file
·49 lines (34 loc) · 1017 Bytes
/
jenkins_build
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
#!/bin/sh
set -o errexit -x
# jenkins job name
job_name="$1"
export PATH=/usr/local/bin:$PATH
if test -d build; then
rm -fr build
fi
make builddir
cd build
make
( cd ../impatient-guide && rm -rf _build && make latexpdf && make html )
# publish
if test "${job_name}" = "master branch"; then
# delete after first run
rm -fr /isis/www/nexus/doc/nxvalidate
cd manual
cd source
rm -fr /isis/www/nexus/doc/examples
cp -fr examples /isis/www/nexus/doc
cd ..
make latexpdf
cd build
#pdf
cp -f latex/nexus.pdf /isis/www/nexus/doc/NeXusManual.pdf
#html
rm -fr /isis/www/nexus/doc/html
cp -fr html /isis/www/nexus/doc
cd ../../..
( cd www; cp -rf * /isis/www/nexus_main )
( cd www/download.nexusformat.org; cp -rf * /isis/www/nexus )
( cd impatient-guide && cp -f _build/latex/NXImpatient.pdf /isis/www/nexus/doc/NXImpatient.pdf && rm -rf /isis/www/nexus/doc/impatient && cp -rf _build/html /isis/www/nexus/doc/impatient )
fi
exit 0