mk-html creates go-import-compatible static files:
mk-html VCS-WEB-URL MODULE-NAME
+mk-htmls iterates through all tags:
+ mk-htmls VCS-WEB-URL VCS-PATH MODULE-BASE-NAME
For example:
mkdir proxy
mkdir html
cd html
- mk-html "http://www.git.cypherpunks.ru/?p=balloon.git" go.cypherpunks.ru/balloon
- mk-html "http://www.git.cypherpunks.ru/?p=balloon.git" go.cypherpunks.ru/balloon/v2
+ mk-htmls "http://www.git.cypherpunks.ru/?p=balloon.git" ~w/balloon go.cypherpunks.ru/balloon
+ mk-htmls "http://www.git.cypherpunks.ru/?p=gotai64n.git" ~w/gotai64n go.cypherpunks.ru/balloon/tai64n
--- /dev/null
+#!/usr/bin/env zsh
+
+set -e
+vcs=$1
+mod=$2
+cd $vcs
+git tag | while read version ; do
+ [[ $version =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]] || continue
+ cols=(${(s:.:)version})
+ v=${cols[1]}
+ modname=$mod
+ [[ $v == v0 || $v == v1 ]] || modname=${modname}/$v
+ print $modname $version
+done
--- /dev/null
+#!/usr/bin/env zsh
+
+set -e
+root=$0:h:a
+vcsurl=$1
+vcspath=$2
+modbase=$3
+
+$root/list-vers $vcspath $modbase | while IFS=" " read modname version ; do
+ $root/mk-html $vcsurl $modname
+done
#!/usr/bin/env zsh
set -e
-
-mkmod=$0:h:a/mk-mod
-
+root=$0:h:a
vcsurl=$1
vcspath=$2
modbase=$3
-( cd $vcspath ; git tag ) | while read version ; do
- [[ $version =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]] || continue
- cols=(${(s:.:)version})
- v=${cols[1]}
- modname=$modbase
- [[ $v == v0 || $v == v1 ]] || modname=${modname}/$v
- $mkmod $vcsurl $vcspath $modname $version
+$root/list-vers $vcspath $modbase | while IFS=" " read modname version ; do
+ $root/mk-mod $vcsurl $vcspath $modname $version
done