Commit aed42896 authored by carignani's avatar carignani
Browse files

show revision information, v0.0.6

parent 454164fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
TOSCAIE_SECRET='super_secret_key'
LAST_COMMIT='something'
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ if [ "$1" == "stop" ] ; then
    exit 0
fi 

sed -i -E "s/(LAST_COMMIT=').+(')/\1$(git log -n 1 --oneline)'/" env

docker build -t tosca-ie-sample:latest .

docker run -d --restart unless-stopped -t -p 5000:5000 --env-file ./env tosca-ie-sample
+3 −0
Original line number Diff line number Diff line
@@ -17,3 +17,6 @@ VERSION = "0.0.5"

SECRET = env_or_false("TOSCAIE_SECRET") or 'super_secret_key'

LAST_COMMIT = env_or_false("LAST_COMMIT")

REPO_URL = "https://labs.etsi.org/rep/cti-tools/tosca2doc/tree/"
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -26,12 +26,17 @@
<center>
<h1>TOSCA import/export</h1>
<h5 style="margin-bottom: 50px">v {{ VERSION }}</h5>

<p>
The tools available on this page are provided with NO GUARANTEES and shall be used ONLY for validation of ETSI Specifications. 
<br/>
<br/>
To report bugs, questions or feature request, please use the <a href="https://forge.etsi.org/bugzilla/enter_bug.cgi?product=Forge">the issue tracker at ETSI Forge</a> and select "TOSCA tools" as component. 
<br/>
{% if last_rev %}
		Current revision is <a href="{{rev_link}}">{{last_rev}}</a>
{% endif %}
<br/>
For any other inquiry, contact <a href="mailto:cti_support@etsi.org">ETSI CTI</a></p>
</center>
<div class="row">
+8 −1
Original line number Diff line number Diff line
@@ -69,11 +69,18 @@ def hello():
    '''
    Render home page
    '''
    if config.LAST_COMMIT is not False:
        link = config.REPO_URL+config.LAST_COMMIT.split(" ")[0]
    else:
        link = "#"

    return render_template(
        "./home.html", 
        VERSION=config.VERSION, 
        doc_allowed_versions=doc2tosca.allowed_versions,
        default_tosca_version=doc2tosca.DEFAULT_TOSCA_VERSION
        default_tosca_version=doc2tosca.DEFAULT_TOSCA_VERSION,
        last_rev=config.LAST_COMMIT,
        rev_link=link
    )

@app.route("/doc2tosca-info")