-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·40 lines (32 loc) · 917 Bytes
/
release.sh
File metadata and controls
executable file
·40 lines (32 loc) · 917 Bytes
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
#!/bin/bash
VERSION=$( xsltproc pom_version.xsl pom.xml )
if [ "$1" != "--testing" ]; then
if ! head Changelog | grep -q "tv_grab_nl_java-$VERSION"; then
echo "Release $VERSION not found in changelog, please update Changelog first";
exit 1;
fi
else
MVN_ARGUMENTS="-DskipTests"
fi
tmpdir=$( mktemp -d ) || exit 1
DESTDIR="$tmpdir/tv_grab_nl_java-$VERSION"
ZIPFILE="$PWD/../tv_grab_nl_java-$VERSION.zip"
mkdir "$DESTDIR"
rm -f "$ZIPFILE"
mvn compiler:compile
if [ "$1" != "--testing" ]; then
mvn test
if [ "$?" != 0 ]; then
echo "Test failed, aborting"
exit 1;
fi
fi
mvn $MVN_ARGUMENTS package
mvn $MVN_ARGUMENTS assembly:single
cp target/tv_grab_nl_java-$VERSION-dep.jar "$DESTDIR/tv_grab_nl_java.jar"
cp tv_grab_nl_java install.sh README LICENSE Changelog "$DESTDIR"
pushd "$tmpdir"
zip -r "$ZIPFILE" *
popd
makensis -DVERSION=$VERSION tv_grab_nl_java.nsi
rm -rf $tmpdir