2015-01-08 23:54:24 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ $# -eq 0 ]; then
|
2015-01-11 00:16:03 +01:00
|
|
|
echo 1>&2 "Usage: $0 <version> [destination]"
|
2015-01-08 23:54:24 +01:00
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
VERSION=$1
|
2015-01-11 00:16:03 +01:00
|
|
|
DESTINATION=$2
|
2015-01-08 23:54:24 +01:00
|
|
|
APP="miniflux"
|
|
|
|
|
2015-01-11 00:16:03 +01:00
|
|
|
if [ -z "$2" ]
|
|
|
|
then
|
|
|
|
DESTINATION=~/Devel/websites/$APP
|
|
|
|
fi
|
|
|
|
|
2015-01-08 23:54:24 +01:00
|
|
|
# tag the release
|
|
|
|
git tag -a v$VERSION -m "Version $VERSION" && git push origin v$VERSION || exit 2
|
|
|
|
|
|
|
|
# create the archive
|
2015-01-11 00:16:03 +01:00
|
|
|
git archive --format=zip --prefix=$APP/ v$VERSION -o $DESTINATION/$APP-$VERSION.zip
|
2015-01-08 23:54:24 +01:00
|
|
|
|
2015-01-11 00:16:03 +01:00
|
|
|
cd $DESTINATION
|
|
|
|
|
|
|
|
if [ -L $APP-latest.zip ]
|
|
|
|
then
|
|
|
|
unlink $APP-latest.zip
|
|
|
|
ln -s $APP-$VERSION.zip $APP-latest.zip
|
|
|
|
fi
|