Add Makefile.

This commit is contained in:
daniel 2016-10-03 18:03:36 +02:00
parent 9f118757a6
commit 1cfe4c57c5
1 changed files with 29 additions and 0 deletions

29
Makefile Normal file
View File

@ -0,0 +1,29 @@
SHELL=/bin/bash
.PHONY=all help release upload website versioninfo
help:
# Available targets:
# website - update website on server
# versioninfo - create versioninfo file for the current release
# upload - upload release files to server
# release - all of the above
all: versioninfo upload website
#
# Check repository status!
#
versioninfo: zaaReloaded2/VERSION
head -n 1 zaaReloaded2/VERSION | tr -d '\r' > www/versioninfo.tmp
chmod 644 www/versioninfo.tmp
echo 'https://doktorkraus.de/zaareloaded/downloads/zaaReloaded-$$VERSION.exe' >> www/versioninfo.tmp
sha256sum deploy/releases/zaaReloaded-$$(head -n 1 zaaReloaded2/VERSION | tr -d '\r').exe >> www/versioninfo.tmp
echo '' >> www/versioninfo.tmp
todos www/versioninfo.tmp
mv www/versioninfo.tmp www/versioninfo.txt
upload:
rsync -ruvz --progress deploy/releases/* doktorkraus.de:/var/www/html/zaareloaded/downloads/
website: versioninfo
rsync -ruvz www/ doktorkraus.de:/var/www/html/zaareloaded/