]> Cypherpunks.ru repositories - gocheese.git/blobdiff - makedist.sh
Less hardcoded module name
[gocheese.git] / makedist.sh
index 8693220447b1aa027296c42f46de52637f877134..b9e3d271f464a4a6fccd1a4216f8f9734f973045 100755 (executable)
@@ -4,12 +4,14 @@ cur=$(pwd)
 tmp=$(mktemp -d)
 release=$1
 [ -n "$release" ]
+MAKEINFO=${MAKEINFO:=makeinfo}
 
 git clone . $tmp/gocheese-$release
 cd $tmp/gocheese-$release
 git checkout v$release
 
-mod_name=$(sed -n 's/^module //p' go.mod)
+redo-ifchange module-name
+mod_name=`cat module-name`
 crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
 mkdir -p src/$mod_name
 mv *.go go.mod go.sum src/$mod_name
@@ -68,7 +70,7 @@ cat > download.texi <<EOF
 You can obtain releases source code prepared tarballs on
 @url{http://www.gocheese.cypherpunks.ru/}.
 EOF
-make gocheese.info
+redo gocheese.info
 
 texi=$(mktemp)
 cat > $texi <<EOF
@@ -79,10 +81,12 @@ cat > $texi <<EOF
 @bye
 EOF
 perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
-makeinfo --plaintext -o INSTALL $texi
+$MAKEINFO --plaintext -o INSTALL $texi
 rm $texi
 
-rm -rf .git .gitignore style.css makedist.sh www.mk
+rm -rf .redo .git .gitignore style.css makedist.sh www.do module-name.do
+echo 'GOPATH=`pwd` ${GO:=go} build -o $3 -ldflags "-X main.Version=`cat VERSION`" `cat module-name`' > gocheese.do
+echo 'GOPATH=`pwd` ${GO:=go} test `cat module-name`/... >&2' > test.do
 
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;