]> Cypherpunks.ru repositories - pygost.git/commitdiff
Take version from source code directly
authorSergey Matveev <stargrave@stargrave.org>
Sat, 5 Sep 2020 08:14:13 +0000 (11:14 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 5 Sep 2020 08:15:40 +0000 (11:15 +0300)
.gitignore
VERSION.do [new file with mode: 0644]
install.texi
maketxts.sh
www.do

index 1521c8b7652b1eec8ed4fe50877aae880c758ee3..138ee566282e11c3bef0fee607fb09daae7901eb 100644 (file)
@@ -1 +1,2 @@
 dist
+VERSION
diff --git a/VERSION.do b/VERSION.do
new file mode 100644 (file)
index 0000000..61428e2
--- /dev/null
@@ -0,0 +1,2 @@
+redo-ifchange pygost/__init__.py
+perl -ne 'print "$1\n" if /__version__.*"(.*)"$/' < pygost/__init__.py
index 1424837c753a7767b5e4e4658fe056af55f90fbd..4404f5f11f6217910f08d3e22631e173d5b7c380 100644 (file)
@@ -1,8 +1,6 @@
 @node Download
 @unnumbered Download
 
-@set VERSION 5.0
-
 No additional dependencies except Python 2.7/3.x interpreter are required.
 
 Preferable way is to download tarball with the signature:
index 1d53d8cc0c9b8bcb7d7f6e520aa3c62f2ae2b25f..d220097ddbed0779318330dcab49bbaa167b6957 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/sh -ex
 
+mkinfo() {
+    ${MAKEINFO:-makeinfo} --plaintext \
+        --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+        --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+        -D "VERSION `cat VERSION`" $@
+}
+
 texi=$(mktemp)
 
 cat > $texi <<EOF
@@ -11,7 +18,7 @@ cat > $texi <<EOF
 `sed -n '3,$p' < news.texi`
 @bye
 EOF
-makeinfo --plaintext -o NEWS $texi
+mkinfo --output NEWS $texi
 
 cat > download.texi <<EOF
 You can obtain releases source code prepared tarballs on
@@ -27,7 +34,7 @@ cat > $texi <<EOF
 @include install.texi
 @bye
 EOF
-makeinfo --plaintext -o INSTALL $texi
+mkinfo --output INSTALL $texi
 
 cat > $texi <<EOF
 \input texinfo
@@ -36,7 +43,7 @@ cat > $texi <<EOF
 @include faq.texi
 @bye
 EOF
-makeinfo --plaintext -o FAQ $texi
+mkinfo --output FAQ $texi
 
 rm -f $texi
 
diff --git a/www.do b/www.do
index 3406d003ada510fbe5632999b5c0a5e2b9d0dcd4..4c3c334f430623d2a575f7dc9f0cfacf687ac788 100644 (file)
--- a/www.do
+++ b/www.do
@@ -1,9 +1,10 @@
+redo-ifchange *.texi VERSION
 rm -f pygost.html/*.html
-makeinfo --html \
+${MAKEINFO:-makeinfo} --html \
+    -D "VERSION `cat VERSION`"
     --set-customization-variable EXTRA_HEAD='<link rev="made" href="mailto:webmaster@cypherpunks.ru">' \
     --set-customization-variable CSS_LINES="`cat style.css`" \
     --set-customization-variable SHOW_TITLE=0 \
-    --set-customization-variable USE_ACCESSKEY=0 \
     --set-customization-variable DATE_IN_HEADER=1 \
     --set-customization-variable TOP_NODE_UP_URL=index.html \
     --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \