Skip to content

Commit 8107c2a

Browse files
committed
Add build script
1 parent 1120dcf commit 8107c2a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

build/build.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
5+
VERSION=$1
6+
BUILDDIR=simplemonitor-$VERSION
7+
8+
if [ -z "$VERSION" ]; then
9+
echo Missing version parameter
10+
exit 1
11+
fi
12+
13+
cd build
14+
15+
[ -d $BUILDDIR ] && rm -rf $BUILDDIR
16+
mkdir $BUILDDIR
17+
18+
echo "--> Copying files"
19+
20+
cp -v ../*.py ../monitor.sql ../LICENCE ../README.md ../CHANGELOG $BUILDDIR
21+
cp -rv ../Monitors ../Alerters ../Loggers ../html $BUILDDIR
22+
23+
echo
24+
echo "--> Tidying up"
25+
find $BUILDDIR -name *.pyc -delete
26+
27+
echo
28+
echo "--> Creating archives"
29+
tar cjf ${BUILDDIR}.tar.gz $BUILDDIR
30+
zip -r ${BUILDDIR}.zip $BUILDDIR
31+

0 commit comments

Comments
 (0)