forked from undera/jmeter-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-upload.sh
executable file
·46 lines (35 loc) · 1.25 KB
/
prepare-upload.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
39
40
41
42
43
44
45
46
#! /bin/sh -ex
REV=`git log -1 --format="%H" | cut -c1-10`
# build
#mvn clean cobertura:cobertura package
rm -rf upload
mkdir -p upload
# site docs
cp -r site/* upload/
# coverage reports
mkdir -p upload/files/coverage
echo "<html><head>" > upload/files/coverage/index.html
echo "<title>Code Coverage Reports for JMeter-Plugins.org</title>" >> upload/files/coverage/index.html
echo "</head><body>" >> upload/files/coverage/index.html
echo "<h1>Code Coverage Reports for JMeter-Plugins.org, revision $REV</h1>" >> upload/files/coverage/index.html
echo "<ul style='font-size: x-large'>" >> upload/files/coverage/index.html
for D in `ls` ; do
if [ -d $D/target/site/cobertura ] ; then
cp -r $D/target/site/cobertura upload/files/coverage/$D
echo "<li><a href='$D'>$D</a></li>" >> upload/files/coverage/index.html
fi
done
echo "</ul>" >> upload/files/coverage/index.html
echo "</body><html>" >> upload/files/coverage/index.html
# package snapshots
mkdir -p upload/files/nightly
for D in `ls` ; do
if ls $D/target/JMeterPlugins-*.zip 2>/dev/null ; then
cp $D/target/JMeterPlugins-*.zip upload/files/nightly/
fi
done
PAT="s/.zip/_$REV.zip/"
rename $PAT upload/files/nightly/*
# examples
cp -r examples upload/img/
tar -czf upload.tgz upload *.sh