diff options
author | Florian Zschocke <florian.zschocke@devolo.de> | 2020-01-30 22:13:10 +0100 |
---|---|---|
committer | Florian Zschocke <florian.zschocke@devolo.de> | 2020-01-30 22:13:10 +0100 |
commit | 77f5b7acbb259268e0e02e37a0bc2db99e9fb41f (patch) | |
tree | 986e07a0cc11f15e7cb94d76b5939a5216cc23f7 /src | |
parent | bb5d1ef31e65a6160e4fa1302d0ee293d5c344ef (diff) | |
parent | 187f8e486ff4b71871bb682807f8068ef6c01001 (diff) | |
download | gitblit-77f5b7acbb259268e0e02e37a0bc2db99e9fb41f.tar.gz gitblit-77f5b7acbb259268e0e02e37a0bc2db99e9fb41f.zip |
Merge branch 'release-github' into master
Diffstat (limited to 'src')
-rw-r--r-- | src/site/siteindex.mkd | 4 | ||||
-rwxr-xr-x | src/site/templates/ghreleasenotes.awk | 66 |
2 files changed, 68 insertions, 2 deletions
diff --git a/src/site/siteindex.mkd b/src/site/siteindex.mkd index aec5c42a..40460e60 100644 --- a/src/site/siteindex.mkd +++ b/src/site/siteindex.mkd @@ -15,8 +15,7 @@ <div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-success" href="%GCURL%gitblit-${project.releaseVersion}.tar.gz">Download Gitblit GO (Linux/OSX)</a></div>
<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-danger" href="%GCURL%gitblit-${project.releaseVersion}.war">Download Gitblit WAR</a></div>
<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-primary" href="%GCURL%manager-${project.releaseVersion}.zip">Download Gitblit Manager</a></div>
- <a href='https://bintray.com/gitblit/releases/gitblit/view?source=watch' alt='Get automatic notifications about new "stable" versions'><img src='https://www.bintray.com/docs/images/bintray_badge_color.png'></a>
- </div>
+</div>
<div data-manifest="http://1c57d83a4c5f3a21ec25c050d4c5e37b.app.jelastic.com/xssu/cross/download/RDYYHABkAFJbUVlMMVU7RUtDARgATExFCEBuGS4jdQJKRUsEDwIBQmNTTEBI" data-width="280" data-theme="flat-blue" data-text="Get it hosted now!" data-tx-empty="Type your email and click the button" data-tx-invalid-email="Invalid email, please check the spelling" data-tx-error="An error has occurred, please try again later" data-tx-success="Check your email" class="je-app" ></div>
<div style="padding-top:5px;">
<table class="table condensed-table">
@@ -25,6 +24,7 @@ <tr><th>Sources</th><td><a href="${project.scmUrl}">GitHub</a></td></tr>
<tr><th>Issues</th><td><a href="${project.issuesUrl}">GitHub</a></td></tr>
<tr><th>Discussion</th><td><a href="${project.forumUrl}">Gitblit Group</a></td></tr>
+ <tr><th>Twitter</th><td><a href="https://twitter.com/gitblit">@gitblit</a></td></tr>
<tr><th>Ohloh</th><td><a target="_top" href="http://www.ohloh.net/p/gitblit"><img border="0" width="100" height="16" src="http://www.ohloh.net/p/gitblit/widgets/project_thin_badge.gif" alt="Ohloh project report for Gitblit" /></a></td></tr>
</tbody>
</table>
diff --git a/src/site/templates/ghreleasenotes.awk b/src/site/templates/ghreleasenotes.awk new file mode 100755 index 00000000..f4479552 --- /dev/null +++ b/src/site/templates/ghreleasenotes.awk @@ -0,0 +1,66 @@ +#! /usr/bin/env awk -f + +BEGIN { on=0 ; skip=1 ; block=0 ; section=""} + +/^[[:blank:]]*id:/ { relId = $NF } + +/r[0-9]+: *{/ { on=1 ; next } +/^[[:blank:]]*}[[:blank:]]*$/ { if (on) { + print "[Full release notes on gitblit.com](http://gitblit.com/releases.html#" relId ")" + exit 0 + } + } + + +on==1 && /^[[:blank:]]*[[:alnum:]]+:[[:blank:]]*(''|~)?$/ { + if (!block) { + skip=1 + if (section == "fixes:" || section == "changes:" || section == "additions:") { printf "\n</details>\n"} + if (section != "") print "" + if (section == "note:") print "----------" + section = "" + if ($NF == "~") next + } + else { + printSection() + next + } + if ($NF == "''") { + block = !block + } + } +on==1 && /^[[:blank:]]*note:/ { skip=0 ; section=$1; print "### Update Note" ; printSingleLineSection() ; next } +on==1 && /^[[:blank:]]*text:/ { skip=0 ; section=$1; printf "\n\n"; printSingleLineSection() ; next } +on==1 && /^[[:blank:]]*security:/ { skip=0 ; section=$1; print "### *Security*" ; next } +on==1 && /^[[:blank:]]*fixes:/ { skip=0 ; section=$1; printf "<details><summary>Fixes</summary>\n\n### Fixes\n" ; next} +on==1 && /^[[:blank:]]*changes:/ { skip=0 ; section=$1; printf "<details><summary>Changes</summary>\n\n### Changes\n" ; next} +on==1 && /^[[:blank:]]*additions:/ { skip=0 ; section=$1; printf "<details><summary>Additions</summary>\n\n### Additions\n" ; next} + +on==1 { + if ($1 == "''") { + block = !block + next + } + if ((block || !skip)) { + printSection() + } + } + +function printSingleLineSection() +{ + if (NF>1 && $2 != "''" && $2 != "~") { + if (protect) gsub(/'/, "'\\''") + for (i=2; i<= NF; i++) printf "%s ", $i + print "" + } +} + +function printSection() +{ + if (section != "text:") sub(/[[:blank:]]+/, "") + gsub(/pr-/, "PR #") + gsub(/issue-/, "issue #") + gsub(/commit-/, "commit ") + if (protect) gsub(/'/, "'\\''") + print $0 +}
\ No newline at end of file |