OSDN Git Service

Modify scripts for release.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 5 May 2012 12:18:27 +0000 (21:18 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 5 May 2012 12:18:27 +0000 (21:18 +0900)
.gitattributes
README
tool/release.mak [deleted file]
tool/release.sh [new file with mode: 0755]

index 3102d8c..5dd37de 100644 (file)
@@ -2,5 +2,5 @@
 README export-subst
 .gitattributes export-ignore
 .gitignore export-ignore
-/tool/release.mak export-ignore
+/tool/release.sh export-ignore
 
diff --git a/README b/README
index 0937cac..bdc6849 100644 (file)
--- a/README
+++ b/README
@@ -24,7 +24,7 @@ Installation
 0. Please make sure that your TeX distribution is up-to-date.
    LuaTeX-ja (luatexja-fontspec.sty) requires xunicode.sty v0.981.
 
-1. If you use TeX Live 2011 or later, you can install LuaTeX-ja via tlmgr.
+1. If you are using TeX Live 2011 or later, you can install LuaTeX-ja via tlmgr.
 
 2. If you must/want to install manually:
 
diff --git a/tool/release.mak b/tool/release.mak
deleted file mode 100644 (file)
index 5be31c5..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#-*- mode: Makefile -*-
-
-PROJECT=luatexja
-DIR=..
-VER=HEAD
-
-all:
-       perl -pi.bak -e 's/\$$VER\$$/$(VER)/g' README
-       rm -f README.bak
-       git add README
-       git commit -m 'Releases $(VER)'
-       git tag $(VER)
-       git archive --format=tar --prefix=$(PROJECT)-$(VER)/ $(VER) | gzip > $(DIR)/$(PROJECT)-$(VER).tar.gz
-       git push origin $(VER) || echo
-       git reset --hard HEAD~
diff --git a/tool/release.sh b/tool/release.sh
new file mode 100755 (executable)
index 0000000..4ebda8e
--- /dev/null
@@ -0,0 +1,45 @@
+PROJECT=luatexja
+DIR=`pwd`/..
+VER=${VER:-`date +%Y%m%d.0`}
+
+TEMP=/tmp
+
+echo "Making Release $VER. Ctrl-C to cancel."
+read REPLY
+if test -d "$TEMP/$PROJECT-$VER"; then
+  echo "Warning: the directory '$TEMP/$PROJECT-$VER' is found:"
+  echo
+  ls $TEMP/$PROJECT-$VER
+  echo
+  echo -n "I'm going to remove this directory. Continue? yes/No"
+  echo
+  read REPLY <&2
+  case $REPLY in
+    y*|Y*) rm -rf $TEMP/$PROJECT-$VER;;
+    *) echo "Aborted."; exit 1;;
+  esac
+fi
+echo
+git commit -m "Releases $VER" --allow-empty
+git archive --format=tar --prefix=$PROJECT-$VER/ HEAD | (cd $TEMP && tar xf -)
+cd $TEMP
+rm -rf $PROJECT-$VER-orig
+cp -r $PROJECT-$VER $PROJECT-$VER-orig
+cd $PROJECT-$VER
+perl -pi.bak -e "s/\\\$VER\\\$/$VER/g" README
+rm -f README.bak
+cd ..
+diff -urN $PROJECT-$VER-orig $PROJECT-$VER
+tar zcf $DIR/$PROJECT-$VER.tar.gz $PROJECT-$VER
+echo
+echo You should execute
+echo
+echo "  git push && git tag $VER && git push origin $VER"
+echo
+echo Informations for submitting CTAN: 
+echo "  CONTRIBUTION: LuaTeX-ja"
+echo "  SUMMARY:      Typeset Japanese documents with Lua(La)TeX."
+echo "  DIRECTORY:    macros/luatex/generic/luatexja"
+echo "  LICENSE:      free/other-free"
+echo "  FILE:         $DIR/$PROJECT-$VER.tar.gz"
+