Replace shell-script by Makefile to make a new archive

This commit is contained in:
Frederic Guillot 2016-07-30 18:29:54 -04:00
parent cd01042f7d
commit 920e522c9e
No known key found for this signature in database
GPG Key ID: 92D77191BA7FBC99
2 changed files with 4 additions and 29 deletions

View File

@ -20,3 +20,7 @@ js:
@ echo "/* AUTO GENERATED FILE, DO NOT MODIFY THIS FILE, USE 'make js' */" > ${JS_FILE}
@ cat assets/js/app.js assets/js/feed.js assets/js/item.js assets/js/event.js assets/js/nav.js >> ${JS_FILE}
@ echo "Miniflux.App.Run();" >> ${JS_FILE}
# Build a new archive: make archive version=1.2.3 dst=/tmp
archive:
@ git archive --format=zip --prefix=miniflux/ v${version} -o ${dst}/miniflux-${version}.zip

View File

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