Skip to content

Commit

Permalink
#30 version
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 30, 2019
1 parent fc661e1 commit 32e405b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
20 changes: 20 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2016-2017 Yegor Bugayenko

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: the above copyright notice and this
permission notice shall be included in all copies or substantial
portions of the Software. The software is provided "as is", without
warranty of any kind, express or implied, including but not limited to
the warranties of merchantability, fitness for a particular purpose
and non-infringement. In no event shall the authors or copyright
holders be liable for any claim, damages or other liability, whether
in an action of contract, tort or otherwise, arising from, out of or
in connection with the software or the use or other dealings in the
software.
15 changes: 14 additions & 1 deletion src/main/java/io/jare/tk/RsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ private static Response make(final String xsl, final Request req,
"version",
new XeAppend("name", Manifests.read("Jare-Version")),
new XeAppend("revision", Manifests.read("Jare-Revision")),
new XeAppend("date", Manifests.read("Jare-Date"))
new XeAppend("date", Manifests.read("Jare-Date")),
new XeAppend("heroku", RsPage.heroku())
)
)
);
Expand All @@ -149,4 +150,16 @@ private static Response make(final String xsl, final Request req,
);
}

/**
* Current Heroku release version.
* @return The version
*/
private static String heroku() {
String ver = System.getenv("HEROKU_RELEASE_VERSION");
if (ver == null) {
ver = "?";
}
return ver;
}

}
7 changes: 4 additions & 3 deletions src/main/xsl/layout.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ software.
<nav>
<ul style="color:gray;">
<li>
<xsl:text>v</xsl:text>
<xsl:value-of select="version/heroku"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="version/name"/>
</li>
<li>
Expand All @@ -107,8 +108,8 @@ software.
<nav>
<ul>
<li>
<a href="http://www.sixnines.io/h/c292">
<img src="http://www.sixnines.io/b/c292?style=flat"/>
<a href="https://www.sixnines.io/h/c292">
<img src="https://www.sixnines.io/b/c292?style=flat"/>
</a>
</li>
</ul>
Expand Down

0 comments on commit 32e405b

Please sign in to comment.