From: Sergey Matveev Date: Mon, 14 Aug 2023 17:56:55 +0000 (+0300) Subject: mk-htmls X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=81bc9017245f3e53e2069f4775b41513170597ff0dbe4b00086b3f56944ce3a9;p=prepro.git mk-htmls --- diff --git a/USAGE b/USAGE index 4ff49c1..e3cd6ab 100644 --- a/USAGE +++ b/USAGE @@ -10,6 +10,8 @@ and creates corresponding "list" files. 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 @@ -21,5 +23,5 @@ For example: 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 diff --git a/list-vers b/list-vers new file mode 100755 index 0000000..e9a5358 --- /dev/null +++ b/list-vers @@ -0,0 +1,14 @@ +#!/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 diff --git a/mk-htmls b/mk-htmls new file mode 100755 index 0000000..93a3866 --- /dev/null +++ b/mk-htmls @@ -0,0 +1,11 @@ +#!/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 diff --git a/mk-mods b/mk-mods index ccee342..dbc2bba 100755 --- a/mk-mods +++ b/mk-mods @@ -1,18 +1,11 @@ #!/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