3 # This is the initial commit of this project.
4 # This is useful to list content of the first tagged version.
5 rootCommit
="c468e930cf7f15c709bf8890f197135a62858f16"
9 git describe
--abbrev=0 --tags "${tag}^" 2>/dev
/null
|| echo "${rootCommit}"
12 function prettyLogUndocumentedTag
{
17 (${tag}) Not generated
25 git log
-n1 --pretty="%an" "${tag}"
28 function linkToTaggedDocumentation
{
31 <a href="${tag}/index.html">
34 <strong>${tag}</strong>
35 <small> released by </small>
36 <strong>$(gitAuthor "${tag}")</strong>
42 function contentOfTaggedDocumentation
{
45 content
=$(git log --pretty="%ad | %h | %s" --date=short "$(parentTag "${tag}")..
${tag}")
46 echo "<pre
>${content}</pre
>"
49 function prettyLogTag {
52 <dt>$(linkToTaggedDocumentation "${tag}")</dt>
53 <dd>$(contentOfTaggedDocumentation "${tag}")</dd>
61 if [ -d "${webRoot}/${tag}" ]
65 prettyLogUndocumentedTag "$tag"
71 git tag --list "v20??
-??
-??
" --sort="-refname"
74 function generateIndex {
79 <meta charset="UTF
-8">
81 <link rel="stylesheet
" href="https
://cdn.rawgit.com
/yegor
256/tacit
/gh
-pages/tacit
-css-1.3
.4.min.css
"/>
86 <h1>Available documentations</h1>
89 $(listTags | formatTags "${webRoot}")
99 function generateDoc {
101 local currentTag="$2"
103 local tagWebRoot="${webRoot}/${currentTag}"
104 if [[ -z "$webRoot" ]]
106 echo "Undefined webRoot directory
"
109 if [[ -z "$currentTag" ]]
111 echo "Undefined current tag
"
114 if [[ -z "$docRoot" ]]
116 echo "Undefined documentation root
"
119 echo "Documentation root
: ${docRoot}"
120 mkdir -p "${webRoot}";
121 cp -r "${docRoot}" "${tagWebRoot}"
122 generateIndex "${webRoot}" > "${webRoot}/index.html
"
125 generateDoc "$1" "$2" "$3"