Use configured version in Contracts homepage
Deploy contracts-flask / validate (push) Canceled after 0s

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Repinoid
2026-10-30 10:34:59 +03:00
co-authored by Copilot
parent 32f7d3d764
commit c79006737f
2 changed files with 20 additions and 8 deletions
+8 -8
View File
@@ -93,7 +93,7 @@
<body> <body>
<div class="topbar"> <div class="topbar">
<img src="/static/logo.svg" alt="Nubes"> <img src="/static/logo.svg" alt="Nubes">
<span class="title">Сверка договоров — LLM AI-driven Event Sourcing <span style="font-weight:400;color:var(--muted);font-size:12px;">v2.0.21</span></span> <span class="title">Сверка договоров — LLM AI-driven Event Sourcing <span style="font-weight:400;color:var(--muted);font-size:12px;">v{{ config["VERSION"] }}</span></span>
<div id="pipelineStepper" style="display:flex;gap:8px;font-size:11px;align-items:center;color:var(--muted);"> <div id="pipelineStepper" style="display:flex;gap:8px;font-size:11px;align-items:center;color:var(--muted);">
<span id="stepUpload">○ Загрузка</span><span>→</span> <span id="stepUpload">○ Загрузка</span><span>→</span>
<span id="stepClassify">○ Классификация</span><span>→</span> <span id="stepClassify">○ Классификация</span><span>→</span>
@@ -227,12 +227,12 @@
</div> </div>
</div> </div>
<script src="/file-picker/file-picker.iife.js"></script> <script src="/file-picker/file-picker.iife.js?v={{ config['VERSION'] }}"></script>
<script src="/static/state.js?v=2.0.21"></script> <script src="/static/state.js?v={{ config['VERSION'] }}"></script>
<script src="/static/app_utils.js?v=2.0.21"></script> <script src="/static/app_utils.js?v={{ config['VERSION'] }}"></script>
<script src="/static/files.js?v=2.0.21"></script> <script src="/static/files.js?v={{ config['VERSION'] }}"></script>
<script src="/static/groups.js?v=2.0.21"></script> <script src="/static/groups.js?v={{ config['VERSION'] }}"></script>
<script src="/static/compare.js?v=2.0.21"></script> <script src="/static/compare.js?v={{ config['VERSION'] }}"></script>
<script src="/static/app.js?v=2.0.21"></script> <script src="/static/app.js?v={{ config['VERSION'] }}"></script>
</body> </body>
</html> </html>
+12
View File
@@ -29,6 +29,18 @@ class TestHealth:
assert data["version"] == VERSION assert data["version"] == VERSION
class TestHomepage:
def test_version_and_asset_urls_use_application_version(self, client):
from config import VERSION
response = client.get("/")
assert response.status_code == 200
html = response.get_data(as_text=True)
assert f">v{VERSION}</span>" in html
assert f"/static/files.js?v={VERSION}" in html
assert f"/file-picker/file-picker.iife.js?v={VERSION}" in html
class TestSpecCurrent: class TestSpecCurrent:
def test_missing_contract_id(self, client): def test_missing_contract_id(self, client):
r = client.get("/api/spec-current") r = client.get("/api/spec-current")