OSDN Git Service

Fix ticket #29140 in kitagawa_test branch.
[luatex-ja/luatexja.git] / tool / release.sh
1 PROJECT=luatexja
2 DIR=`pwd`/..
3 VER=${VER:-`date +%Y%m%d.0`}
4
5 TEMP=/tmp
6
7 echo "Making Release $VER. Ctrl-C to cancel."
8 read REPLY
9 if test -d "$TEMP/$PROJECT-$VER"; then
10   echo "Warning: the directory '$TEMP/$PROJECT-$VER' is found:"
11   echo
12   ls $TEMP/$PROJECT-$VER
13   echo
14   echo -n "I'm going to remove this directory. Continue? yes/No"
15   echo
16   read REPLY <&2
17   case $REPLY in
18     y*|Y*) rm -rf $TEMP/$PROJECT-$VER;;
19     *) echo "Aborted."; exit 1;;
20   esac
21 fi
22 echo
23 git commit -m "Releases $VER" --allow-empty
24 git archive --format=tar --prefix=$PROJECT-$VER/ HEAD | (cd $TEMP && tar xf -)
25 cd $TEMP
26 rm -rf $PROJECT-$VER-orig
27 cp -r $PROJECT-$VER $PROJECT-$VER-orig
28 cd $PROJECT-$VER
29 perl -pi.bak -e "s/\\\$VER\\\$/$VER/g" README
30 rm -f README.bak
31 cd ..
32 diff -urN $PROJECT-$VER-orig $PROJECT-$VER
33 tar zcf $DIR/$PROJECT-$VER.tar.gz $PROJECT-$VER
34 echo
35 echo You should execute
36 echo
37 echo "  git push && git tag $VER && git push origin $VER"
38 echo
39 echo Informations for submitting CTAN: 
40 echo "  CONTRIBUTION: LuaTeX-ja"
41 echo "  SUMMARY:      Typeset Japanese documents with Lua(La)TeX."
42 echo "  DIRECTORY:    macros/luatex/generic/luatexja"
43 echo "  LICENSE:      free/other-free"
44 echo "  FILE:         $DIR/$PROJECT-$VER.tar.gz"
45