Added support for %curver comment tag
parent
a25961a088
commit
bd1ce2dad4
|
@ -1,6 +1,6 @@
|
|||
<p>
|
||||
<span class="release-current">
|
||||
Current Release: <span class="version">0.1.0</span>
|
||||
Current Release: <span class="version"><!--%curver--></span>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -18,11 +18,15 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
# currently, this only replaces %inc commands with the file contents
|
||||
curver="$( git tag -l | tail -n1 )"
|
||||
|
||||
# TODO: Both sed and gawk are unnecessary; it was just the most convenient
|
||||
# solution
|
||||
gawk '
|
||||
match( $0, /^ *<!--%inc (.*?) *--> *$/, arr ) {
|
||||
system( "cat " arr[1] )
|
||||
next
|
||||
}
|
||||
{ print }
|
||||
'
|
||||
' \
|
||||
| sed 's/<!--%curver-->/'$curver'/g'
|
||||
|
|
Loading…
Reference in New Issue