-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathjenkins_build
executable file
·52 lines (35 loc) · 1003 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
50
51
52
#!/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
export WWW_ROOT=/isis/www/nexus
mkdir -p ${WWW_ROOT}/doc/examples
# delete after first run
rm -fr ${WWW_ROOT}/doc/nxvalidate
cd manual
cd source
rm -fr ${WWW_ROOT}/doc/examples
cp -fr examples ${WWW_ROOT}/doc
cd ..
make latexpdf
cd build
#pdf
cp -f latex/nexus.pdf ${WWW_ROOT}/doc/NeXusManual.pdf
#html
rm -fr ${WWW_ROOT}/doc/html
cp -fr html ${WWW_ROOT}/doc
cd ../../..
( cd www/download.nexusformat.org; cp -rf * ${WWW_ROOT} )
( cd impatient-guide && cp -f _build/latex/NXImpatient.pdf ${WWW_ROOT}/doc/NXImpatient.pdf && rm -rf ${WWW_ROOT}/doc/impatient && cp -rf _build/html ${WWW_ROOT}/doc/impatient )
fi
exit 0