forked from undera/jmeter-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-upload.sh
executable file
·56 lines (43 loc) · 1.46 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
47
48
49
50
51
52
53
54
55
56
#! /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/*-*.zip 2>/dev/null ; then
cp $D/target/*-*.zip upload/files/nightly/
fi
done
cp manager/target/jmeter-plugins-manager-*.jar upload/files/nightly/
PAT="s/.jar/_$REV.jar/"
rename $PAT upload/files/nightly/*
# examples
cp -r examples upload/img/
curl -sS https://getcomposer.org/installer | php
cd upload
../composer.phar update --no-dev --prefer-stable
cp vendor/undera/pwe/.htaccess ./
cd ..
cd upload
zip -r site.zip * .htaccess
cd ..