Version information in build, fixes #56

This commit is contained in:
copy 2016-01-22 23:54:02 +01:00
parent 53caefcf5f
commit 88b9cd73d8
2 changed files with 11 additions and 0 deletions

View file

@ -117,6 +117,16 @@ run:
#sleep 1
#$(BROWSER) http://localhost:8000/index.html &
update_version:
set -e ;\
COMMIT=`git log --format="%h" -n 1` ;\
DATE=`git log --date="format:%b %e, %Y %H:%m" --format="%cd" -n 1` ;\
SEARCH='<code>Version: <a href="https://github.com/copy/v86/commits/[a-f0-9]\+">[a-f0-9]\+</a> ([^(]\+)</a></code>' ;\
REPLACE='<code>Version: <a href="https://github.com/copy/v86/commits/'$$COMMIT'">'$$COMMIT'</a> ('$$DATE')</a></code>' ;\
sed -i "s@$$SEARCH@$$REPLACE@g" index.html ;\
grep $$COMMIT index.html
$(CLOSURE):
wget -P closure-compiler http://dl.google.com/closure-compiler/compiler-latest.zip
unzip -d closure-compiler closure-compiler/compiler-latest.zip compiler.jar

View file

@ -196,6 +196,7 @@ In Linux it can be accessed with `cat /dev/ttyS0`
</textarea>
<br style="clear:both">
<code>Version: <a href="https://github.com/copy/v86/commits/53caefc">53caefc</a> (Jan 22, 2016 23:01)</a></code>
<hr>
<a href="debug.html">Enable debug</a>